From 5102e75698ed3be7fa1b08a1188081a9558fd77a Mon Sep 17 00:00:00 2001 From: Phan An Date: Tue, 4 Sep 2018 12:43:12 +0700 Subject: [PATCH] Apply fixes from StyleCI (#803) --- app/Console/Commands/SyncMediaCommand.php | 2 +- app/Http/Controllers/API/LastfmController.php | 3 +-- app/Services/ApiClient.php | 2 -- app/Services/LastfmService.php | 3 +-- app/Services/Streamers/PHPStreamer.php | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/SyncMediaCommand.php b/app/Console/Commands/SyncMediaCommand.php index 0a25f6a7..3baae648 100644 --- a/app/Console/Commands/SyncMediaCommand.php +++ b/app/Console/Commands/SyncMediaCommand.php @@ -60,7 +60,7 @@ class SyncMediaCommand extends Command */ protected function syncAll(): void { - $this->info('Syncing media from ' . Setting::get('media_path') .PHP_EOL); + $this->info('Syncing media from '.Setting::get('media_path').PHP_EOL); // Get the tags to sync. // Notice that this is only meaningful for existing records. diff --git a/app/Http/Controllers/API/LastfmController.php b/app/Http/Controllers/API/LastfmController.php index da34bb19..d2cb68f1 100644 --- a/app/Http/Controllers/API/LastfmController.php +++ b/app/Http/Controllers/API/LastfmController.php @@ -22,8 +22,7 @@ class LastfmController extends Controller Guard $auth, LastfmService $lastfmService, JWTAuth $jwtAuth - ) - { + ) { $this->auth = $auth; $this->lastfmService = $lastfmService; $this->jwtAuth = $jwtAuth; diff --git a/app/Services/ApiClient.php b/app/Services/ApiClient.php index 706ede85..cbacf116 100644 --- a/app/Services/ApiClient.php +++ b/app/Services/ApiClient.php @@ -71,8 +71,6 @@ abstract class ApiClient } catch (ClientException $e) { $this->logger->error($e); } - - return null; } /** diff --git a/app/Services/LastfmService.php b/app/Services/LastfmService.php index 0957c33d..a0faa7f4 100644 --- a/app/Services/LastfmService.php +++ b/app/Services/LastfmService.php @@ -33,8 +33,7 @@ class LastfmService extends ApiClient implements ApiConsumerInterface Cache $cache, Logger $logger, UserPreferenceService $userPreferenceService - ) - { + ) { parent::__construct($client, $cache, $logger); $this->userPreferenceService = $userPreferenceService; } diff --git a/app/Services/Streamers/PHPStreamer.php b/app/Services/Streamers/PHPStreamer.php index e5fe5d88..59585d5f 100644 --- a/app/Services/Streamers/PHPStreamer.php +++ b/app/Services/Streamers/PHPStreamer.php @@ -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) {