Apply fixes from StyleCI (#796)

This commit is contained in:
Phan An 2018-08-30 09:53:39 +07:00 committed by GitHub
parent 37ec4aaa6f
commit 86cd0fbb4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -70,7 +70,7 @@ abstract class ApiClient
} catch (ClientException $e) {
Log::error($e);
return null;
return;
}
}

View file

@ -3,7 +3,6 @@
namespace App\Services\Streamers;
use DaveRandom\Resume\FileResource;
use function DaveRandom\Resume\get_request_header;
use DaveRandom\Resume\InvalidRangeHeaderException;
use DaveRandom\Resume\NonExistentFileException;
use DaveRandom\Resume\RangeSet;
@ -12,6 +11,7 @@ use DaveRandom\Resume\ResourceServlet;
use DaveRandom\Resume\SendFileFailureException;
use DaveRandom\Resume\UnreadableFileException;
use DaveRandom\Resume\UnsatisfiableRangeException;
use function DaveRandom\Resume\get_request_header;
class PHPStreamer extends Streamer implements DirectStreamerInterface
{
@ -19,7 +19,7 @@ class PHPStreamer extends Streamer implements DirectStreamerInterface
{
try {
$rangeSet = RangeSet::createFromHeader(get_request_header('Range'));
/** @var Resource $resource */
/** @var resource $resource */
$resource = new FileResource($this->song->path, 'application/octet-stream');
(new ResourceServlet($resource))->sendResource($rangeSet);
} catch (InvalidRangeHeaderException $e) {

View file

@ -44,7 +44,7 @@ class YouTubeService extends ApiClient implements ApiConsumerInterface
public function search(string $q, string $pageToken = '', int $perPage = 10)
{
if (!$this->enabled()) {
return null;
return;
}
$uri = sprintf('search?part=snippet&type=video&maxResults=%s&pageToken=%s&q=%s',