mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Apply fixes from StyleCI (#796)
This commit is contained in:
parent
37ec4aaa6f
commit
86cd0fbb4f
3 changed files with 4 additions and 4 deletions
|
@ -70,7 +70,7 @@ abstract class ApiClient
|
|||
} catch (ClientException $e) {
|
||||
Log::error($e);
|
||||
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue