refactor: Fix some types and unused variables

This commit is contained in:
Pierre Rudloff 2019-04-21 19:47:30 +02:00
parent d4e8e32cd6
commit 61cb73dc59
5 changed files with 14 additions and 18 deletions

View File

@ -156,7 +156,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface
* *
* @param string $key string $key Specific metadata to retrieve. * @param string $key string $key Specific metadata to retrieve.
* *
* @return null * @return array|mixed|null
*/ */
public function getMetadata($key = null) public function getMetadata($key = null)
{ {

View File

@ -16,12 +16,14 @@ use Symfony\Component\Process\Process;
* *
* Due to the way youtube-dl behaves, this class can also contain information about a playlist. * Due to the way youtube-dl behaves, this class can also contain information about a playlist.
* *
* @property-read string $title Title * @property-read string $title Title
* @property-read string $protocol Network protocol (HTTP, RTMP, etc.) * @property-read string $protocol Network protocol (HTTP, RTMP, etc.)
* @property-read string $url File URL * @property-read string $url File URL
* @property-read string $ext File extension * @property-read string $ext File extension
* @property-read string $extractor_key youtube-dl extractor class used * @property-read string $extractor_key youtube-dl extractor class used
* @property-read array $entries List of videos (if the object contains information about a playlist) * @property-read array $entries List of videos (if the object contains information about a playlist)
* @property-read array $rtmp_conn
* @property-read string|null $_type Object type (usually "playlist" or null)
*/ */
class Video class Video
{ {

View File

@ -442,7 +442,6 @@ class FrontController
if ($request->isGet()) { if ($request->isGet()) {
$response = $response->withBody(new Stream($stream)); $response = $response->withBody(new Stream($stream));
} }
$webpageUrl = $request->getQueryParam('url');
return $response->withHeader( return $response->withHeader(
'Content-Disposition', 'Content-Disposition',

View File

@ -36,8 +36,9 @@ class ConfigTest extends BaseTest
*/ */
public function testGetInstance() public function testGetInstance()
{ {
$this->assertEquals($this->config->convert, false); $config = Config::getInstance();
$this->assertConfig($this->config); $this->assertEquals($config->convert, false);
$this->assertConfig($config);
} }
/** /**
@ -67,7 +68,8 @@ class ConfigTest extends BaseTest
*/ */
public function testSetFile() public function testSetFile()
{ {
$this->assertNull(Config::setFile($this->getConfigFile())); Config::setFile($this->getConfigFile());
$this->assertConfig($this->config);
} }
/** /**

View File

@ -48,13 +48,6 @@ class FrontControllerTest extends BaseTest
*/ */
private $controller; private $controller;
/**
* Config class instance.
*
* @var Config
*/
private $config;
/** /**
* Prepare tests. * Prepare tests.
*/ */