diff --git a/classes/PlaylistArchiveStream.php b/classes/PlaylistArchiveStream.php index a4a75e0..d25a736 100644 --- a/classes/PlaylistArchiveStream.php +++ b/classes/PlaylistArchiveStream.php @@ -63,7 +63,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface /** * PlaylistArchiveStream constructor. * - * @param Config $config Config instance. + * @param Config $config Config instance. * @param stdClass $video Video object returned by youtube-dl * @param string $format Requested format */ @@ -120,13 +120,12 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface */ public function getSize() { - return null; } /** * Returns whether or not the stream is seekable. * - * @return boolean + * @return bool */ public function isSeekable() { @@ -146,7 +145,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface /** * Returns whether or not the stream is writable. * - * @return boolean + * @return bool */ public function isWritable() { @@ -156,7 +155,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface /** * Returns whether or not the stream is readable. * - * @return boolean + * @return bool */ public function isReadable() { @@ -176,13 +175,12 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface /** * Get stream metadata as an associative array or retrieve a specific key. * - * @param string $key string $key Specific metadata to retrieve. + * @param string $key string $key Specific metadata to retrieve. * * @return null */ public function getMetadata($key = null) { - return null; } /** @@ -194,6 +192,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface { $stream = $this->buffer; $this->close(); + return $stream; } @@ -214,7 +213,7 @@ class PlaylistArchiveStream extends TarArchive implements StreamInterface } /** - * Returns the current position of the file read/write pointer + * Returns the current position of the file read/write pointer. * * @return int|false */ diff --git a/classes/PlaylistArchiveVideo.php b/classes/PlaylistArchiveVideo.php index cf3609b..d67c1ea 100644 --- a/classes/PlaylistArchiveVideo.php +++ b/classes/PlaylistArchiveVideo.php @@ -5,12 +5,6 @@ namespace Alltube; -use Barracuda\ArchiveStream\TarArchive; -use GuzzleHttp\Client; -use Psr\Http\Message\StreamInterface; -use RuntimeException; -use stdClass; - /** * Video streamed to a PlaylistArchiveStream. */ diff --git a/index.php b/index.php index 34d8d99..c42b96e 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,6 @@ use Alltube\Config; use Alltube\Controller\FrontController; use Alltube\LocaleManager; use Alltube\LocaleMiddleware; -use Alltube\PlaylistArchiveStream; use Alltube\UglyRouter; use Alltube\ViewFactory; use Slim\App; diff --git a/tests/PlaylistArchiveStreamTest.php b/tests/PlaylistArchiveStreamTest.php index 1c50c54..0f07b2e 100644 --- a/tests/PlaylistArchiveStreamTest.php +++ b/tests/PlaylistArchiveStreamTest.php @@ -8,8 +8,8 @@ namespace Alltube\Test; use Alltube\Config; use Alltube\PlaylistArchiveStream; use PHPUnit\Framework\TestCase; -use stdClass; use RuntimeException; +use stdClass; /** * Unit tests for the ViewFactory class. @@ -64,7 +64,6 @@ class PlaylistArchiveStreamTest extends TestCase $this->stream->write('foo'); } - /** * Test the tell() function. *