Passed
Pull Request — master (#1693)
by Darko
02:59
created
Blacklight/PopulateAniDB.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     $episodeArray[$i]['episode_no'] = (int) $episode->epno;
125 125
                     $episodeArray[$i]['airdate'] = (string) $episode->airdate;
126 126
 
127
-                    if (! empty($episode->title)) {
127
+                    if (!empty($episode->title)) {
128 128
                         foreach ($episode->title as $title) {
129 129
                             $xmlAttribs = $title->attributes('xml', true);
130 130
                             // only english, x-jat imploded episode titles for now
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                     'updated' => now(),
245 245
                 ]
246 246
             );
247
-        if (! empty($AniDBInfoArray['epsarr'])) {
247
+        if (!empty($AniDBInfoArray['epsarr'])) {
248 248
             $this->insertAniDBEpisodes($aniDbId, $AniDBInfoArray['epsarr']);
249 249
         }
250 250
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
     private function insertAniDBEpisodes($aniDbId, array $episodeArr = []): void
255 255
     {
256
-        if (! empty($episodeArr)) {
256
+        if (!empty($episodeArr)) {
257 257
             foreach ($episodeArr as $episode) {
258 258
                 AnidbEpisode::insertOrIgnore(
259 259
                     [
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
                     'updated' => now(),
413 413
                 ]
414 414
             );
415
-        if (! empty($AniDBInfoArray['epsarr'])) {
415
+        if (!empty($AniDBInfoArray['epsarr'])) {
416 416
             $this->insertAniDBEpisodes($aniDbId, $AniDBInfoArray['epsarr']);
417 417
         }
418 418
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
             $picture = $this->updateAniDBInfoEps($aniDbId, $AniDBInfoArray);
430 430
         }
431 431
 
432
-        if (! empty($picture) && ! file_exists($this->imgSavePath.$aniDbId.'.jpg')) {
432
+        if (!empty($picture) && !file_exists($this->imgSavePath.$aniDbId.'.jpg')) {
433 433
             (new ReleaseImage)->saveImage(
434 434
                 $aniDbId,
435 435
                 'http://img7.anidb.net/pics/anime/'.$picture,
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiV2Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 'search' => ['available' => 'yes', 'supportedParams' => 'id'],
52 52
                 'tv-search' => ['available' => 'yes', 'supportedParams' => 'id,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'],
53 53
                 'movie-search' => ['available' => 'yes', 'supportedParams' => 'id, imdbid, tmdbid, traktid'],
54
-                'audio-search' => ['available' => 'no',  'supportedParams' => ''],
54
+                'audio-search' => ['available' => 'no', 'supportedParams' => ''],
55 55
             ],
56 56
             'categories' => fractal($category, new CategoryTransformer),
57 57
         ];
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiInformController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,18 +19,18 @@
 block discarded – undo
19 19
      */
20 20
     public function release(Request $request): \Illuminate\Http\JsonResponse
21 21
     {
22
-        $releaseObName = $request->has('relo') && ! empty($request->input('relo')) ? $request->input('relo') : '';
23
-        $releasePrName = $request->has('relp') && ! empty($request->input('relp')) ? $request->input('relp') : '';
24
-        $apiToken = $request->has('api_token') && ! empty($request->input('api_token')) ? $request->input('api_token') : '';
22
+        $releaseObName = $request->has('relo') && !empty($request->input('relo')) ? $request->input('relo') : '';
23
+        $releasePrName = $request->has('relp') && !empty($request->input('relp')) ? $request->input('relp') : '';
24
+        $apiToken = $request->has('api_token') && !empty($request->input('api_token')) ? $request->input('api_token') : '';
25 25
         $user = User::query()->where('api_token', $request->input('api_token'))->first();
26
-        if (! $user) {
26
+        if (!$user) {
27 27
             return response()->json(['message' => 'Indexer inform error, wrong api key!'], 404);
28 28
         }
29 29
 
30
-        if (! empty($releaseObName) && ! empty($releasePrName) && ! empty($apiToken)) {
30
+        if (!empty($releaseObName) && !empty($releasePrName) && !empty($apiToken)) {
31 31
             ReleaseInform::insertOrIgnore(['relOName' => $releaseObName, 'relPName' => $releasePrName, 'api_token' => $apiToken, 'created_at' => now(), 'updated_at' => now()]);
32 32
             $release = Release::whereSearchname($releaseObName)->first();
33
-            if (! empty($release)) {
33
+            if (!empty($release)) {
34 34
                 (new NameFixer)->updateRelease($release, $releasePrName, 'Release Inform API', true, 'Filenames, ', 1, true);
35 35
             }
36 36
 
Please login to merge, or discard this patch.
app/Models/Predb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
             return $predb;
197 197
         }
198 198
         $sql = self::query()->leftJoin('releases', 'releases.predb_id', '=', 'predb.id')->orderByDesc('predb.predate');
199
-        if (! empty($search)) {
199
+        if (!empty($search)) {
200 200
             if (config('nntmux.elasticsearch_enabled') === true) {
201 201
                 $ids = (new ElasticSearchSiteSearch)->predbIndexSearch($search);
202 202
             } else {
Please login to merge, or discard this patch.
app/Console/Commands/NntmuxPopulateSearchIndexes.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $manticore->truncateRTIndex(Arr::wrap('releases_rt'));
65 65
         $data = [];
66 66
         $total = Release::count();
67
-        if (! $total) {
67
+        if (!$total) {
68 68
             $this->warn('Releases table is empty. Nothing to do.');
69 69
             exit();
70 70
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             ->select(['releases.id', 'releases.name', 'releases.searchname', 'releases.fromname', 'releases.categories_id'])
85 85
             ->selectRaw('IFNULL(GROUP_CONCAT(release_files.name SEPARATOR " "),"") filename')
86 86
             ->groupBy('id')
87
-            ->chunk($max, function ($releases) use ($manticore, $bar, $data) {
87
+            ->chunk($max, function($releases) use ($manticore, $bar, $data) {
88 88
                 foreach ($releases as $r) {
89 89
                     $data[] = [
90 90
                         'id' => $r->id,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $data = [];
113 113
 
114 114
         $total = Predb::count();
115
-        if (! $total) {
115
+        if (!$total) {
116 116
             $this->warn('PreDB table is empty. Nothing to do.');
117 117
             exit();
118 118
         }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             ->select(['id', 'title', 'filename', 'source'])
130 130
             ->groupBy('id')
131 131
             ->orderBy('id')
132
-            ->chunk($max, function ($pre) use ($manticore, $bar, $data) {
132
+            ->chunk($max, function($pre) use ($manticore, $bar, $data) {
133 133
                 foreach ($pre as $p) {
134 134
                     $data[] = [
135 135
                         'id' => $p->id,
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $data = ['body' => []];
152 152
         $elastic = new ElasticSearchSiteSearch;
153 153
         $total = Release::count();
154
-        if (! $total) {
154
+        if (!$total) {
155 155
             $this->warn('Could not get database information for releases table.');
156 156
             exit();
157 157
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->select(['releases.id', 'releases.name', 'releases.searchname', 'releases.fromname', 'releases.categories_id', 'releases.postdate'])
170 170
             ->selectRaw('IFNULL(GROUP_CONCAT(release_files.name SEPARATOR " "),"") filename')
171 171
             ->groupBy('id')
172
-            ->chunk($max, function ($releases) use ($bar, $data) {
172
+            ->chunk($max, function($releases) use ($bar, $data) {
173 173
                 foreach ($releases as $r) {
174 174
                     $searchName = str_replace(['.', '-'], ' ', $r->searchname);
175 175
                     $data['body'][] = [
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $data = ['body' => []];
203 203
         $elastic = new ElasticSearchSiteSearch;
204 204
         $total = Predb::count();
205
-        if (! $total) {
205
+        if (!$total) {
206 206
             $this->warn('Could not get database information for predb table.');
207 207
             exit();
208 208
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             ->select(['id', 'title', 'filename', 'source'])
220 220
             ->groupBy('id')
221 221
             ->orderBy('id')
222
-            ->chunk($max, function ($pre) use ($bar, $data) {
222
+            ->chunk($max, function($pre) use ($bar, $data) {
223 223
                 foreach ($pre as $p) {
224 224
                     $data['body'][] = [
225 225
                         'index' => [
Please login to merge, or discard this patch.
app/Console/Commands/CleanNZB.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function handle(): void
38 38
     {
39 39
         // Check if any options are false
40
-        if (! $this->option('notindb') && ! $this->option('notondisk')) {
40
+        if (!$this->option('notindb') && !$this->option('notondisk')) {
41 41
             $this->error('You must specify at least one option. See: --help');
42 42
             exit();
43 43
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $guid = stristr($filePath->getFilename(), '.nzb.gz', true);
64 64
             if (File::isFile($filePath) && $guid) {
65 65
                 // If NZB file guid is not present in DB delete the file from disk
66
-                if (! $releases->whereGuid($guid)->exists()) {
66
+                if (!$releases->whereGuid($guid)->exists()) {
67 67
                     if ($delete) {
68 68
                         File::delete($filePath);
69 69
                     }
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         $total = Release::count();
89 89
         $this->alert("Total releases to check: $total");
90 90
 
91
-        Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function (Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) {
91
+        Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function(Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) {
92 92
             echo 'Total done: '.$checked."\r";
93 93
             foreach ($releases as $r) {
94 94
 
95
-                if (! $nzb->NZBPath($r->guid)) {
95
+                if (!$nzb->NZBPath($r->guid)) {
96 96
                     if ($delete) {
97 97
                         $rel->deleteSingle(['g' => $r->guid, 'i' => $r->id], $nzb, new ReleaseImage);
98 98
                     }
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,18 +83,18 @@  discard block
 block discarded – undo
83 83
 Route::post('login', [LoginController::class, 'login'])->name('login.post');
84 84
 Route::match(['GET', 'POST'], 'logout', [LoginController::class, 'logout'])->name('logout');
85 85
 
86
-Route::middleware('isVerified')->group(function () {
86
+Route::middleware('isVerified')->group(function() {
87 87
     Route::match(['GET', 'POST'], 'resetpassword', [ResetPasswordController::class, 'reset'])->name('resetpassword');
88 88
     Route::match(['GET', 'POST'], 'profile', [ProfileController::class, 'show'])->name('profile');
89 89
 
90
-    Route::prefix('browse')->group(function () {
90
+    Route::prefix('browse')->group(function() {
91 91
         Route::match(['GET', 'POST'], 'tags', [BrowseController::class, 'tags'])->name('tags');
92 92
         Route::match(['GET', 'POST'], 'group', [BrowseController::class, 'group'])->name('group');
93 93
         Route::match(['GET', 'POST'], 'All', [BrowseController::class, 'index'])->name('All');
94 94
         Route::match(['GET', 'POST'], '{parentCategory}/{id?}', [BrowseController::class, 'show'])->middleware('clearance')->name('browse');
95 95
     });
96 96
 
97
-    Route::prefix('cart')->group(function () {
97
+    Route::prefix('cart')->group(function() {
98 98
         Route::match(['GET', 'POST'], 'index', [CartController::class, 'index'])->name('cart.index');
99 99
         Route::match(['GET', 'POST'], 'add', [CartController::class, 'store'])->name('cart.add');
100 100
         Route::match(['GET', 'POST'], 'delete/{id}', [CartController::class, 'destroy'])->name('cart.delete');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     Route::match(['GET', 'POST'], 'content', [ContentController::class, 'show'])->name('content');
111 111
     Route::match(['GET', 'POST'], 'failed', [FailedReleasesController::class, 'failed'])->name('failed');
112 112
 
113
-    Route::middleware('clearance')->group(function () {
113
+    Route::middleware('clearance')->group(function() {
114 114
         Route::match(['GET', 'POST'], 'Games', [GamesController::class, 'show'])->name('Games');
115 115
         Route::match(['GET', 'POST'], 'Movies/{id?}', [MovieController::class, 'showMovies'])->name('Movies');
116 116
         Route::match(['GET', 'POST'], 'movie', [MovieController::class, 'showMovies'])->name('movie');
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     Route::post('disable2fa', [PasswordSecurityController::class, 'disable2fa'])->name('disable2fa');
143 143
 });
144 144
 
145
-Route::middleware('role:Admin', '2fa')->prefix('admin')->group(function () {
145
+Route::middleware('role:Admin', '2fa')->prefix('admin')->group(function() {
146 146
     Route::match(['GET', 'POST'], 'index', [AdminPageController::class, 'index'])->name('admin.index');
147 147
     Route::match(['GET', 'POST'], 'anidb-delete/{id}', [AdminAnidbController::class, 'destroy'])->name('admin.anidb-delete');
148 148
     Route::match(['GET', 'POST'], 'anidb-edit/{id}', [AdminAnidbController::class, 'edit'])->name('admin.anidb-edit');
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
 
206 206
 });
207 207
 
208
-Route::middleware('role_or_permission:Admin|Moderator|edit release')->prefix('admin')->group(function () {
208
+Route::middleware('role_or_permission:Admin|Moderator|edit release')->prefix('admin')->group(function() {
209 209
     Route::match(['GET', 'POST'], 'release-edit', [AdminReleasesController::class, 'edit'])->name('admin.release-edit');
210 210
 });
211 211
 
212
-Route::post('2faVerify', function () {
212
+Route::post('2faVerify', function() {
213 213
     return redirect()->to(URL()->previous());
214 214
 })->name('2faVerify')->middleware('2fa');
215 215
 
Please login to merge, or discard this patch.
Blacklight/IRCClient.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $transport = ($tls === true ? 'tls' : 'tcp');
193 193
 
194 194
         $socket_string = $transport.'://'.$hostname.':'.$port;
195
-        if ($socket_string !== $this->_remote_socket_string || ! $this->_connected()) {
195
+        if ($socket_string !== $this->_remote_socket_string || !$this->_connected()) {
196 196
             if ($hostname === '') {
197 197
                 echo 'ERROR: IRC host name must not be empty!'.PHP_EOL;
198 198
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function login(string $nickName, string $userName, string $realName, $password = null): bool
239 239
     {
240
-        if (! $this->_connected()) {
240
+        if (!$this->_connected()) {
241 241
             echo 'ERROR: You must connect to IRC first!'.PHP_EOL;
242 242
 
243 243
             return false;
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
         $this->_realName = $realName;
255 255
         $this->_password = $password;
256 256
 
257
-        if (empty($password) && ! $this->_writeSocket('PASSWORD '.$password)) {
257
+        if (empty($password) && !$this->_writeSocket('PASSWORD '.$password)) {
258 258
             return false;
259 259
         }
260 260
 
261
-        if (! $this->_writeSocket('NICK '.$nickName)) {
261
+        if (!$this->_writeSocket('NICK '.$nickName)) {
262 262
             return false;
263 263
         }
264 264
 
265
-        if (! $this->_writeSocket('USER '.$userName.' 0 * :'.$realName)) {
265
+        if (!$this->_writeSocket('USER '.$userName.' 0 * :'.$realName)) {
266 266
             return false;
267 267
         }
268 268
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                         $tempPass = $password;
292 292
                     }
293 293
 
294
-                    if ($password !== null && ! $this->_writeSocket('PASS '.$tempPass)) {
294
+                    if ($password !== null && !$this->_writeSocket('PASS '.$tempPass)) {
295 295
                         return false;
296 296
                     }
297 297
 
@@ -370,13 +370,13 @@  discard block
 block discarded – undo
370 370
     {
371 371
         $this->_channels = $channels;
372 372
 
373
-        if (! $this->_connected()) {
373
+        if (!$this->_connected()) {
374 374
             echo 'ERROR: You must connect to IRC first!'.PHP_EOL;
375 375
 
376 376
             return false;
377 377
         }
378 378
 
379
-        if (! empty($channels)) {
379
+        if (!empty($channels)) {
380 380
             foreach ($channels as $channel => $password) {
381 381
                 $this->_joinChannel($channel, $password ?? '');
382 382
             }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     protected function _pong(string $host)
406 406
     {
407
-        if (! $this->_writeSocket('PONG '.$host)) {
407
+        if (!$this->_writeSocket('PONG '.$host)) {
408 408
             $this->_reconnect();
409 409
         }
410 410
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $pong = $this->_writeSocket('PING '.$host);
423 423
 
424 424
         // Check if there's a connection error.
425
-        if ($pong === false || ((time() - $this->_lastPing) > ($this->_socket_timeout / 2) && ! 0 === strpos($this->_buffer, 'PONG'))) {
425
+        if ($pong === false || ((time() - $this->_lastPing) > ($this->_socket_timeout / 2) && !0 === strpos($this->_buffer, 'PONG'))) {
426 426
             $this->_reconnect();
427 427
         }
428 428
 
@@ -437,12 +437,12 @@  discard block
 block discarded – undo
437 437
      */
438 438
     protected function _reconnect(): void
439 439
     {
440
-        if (! $this->connect($this->_remote_host, $this->_remote_port, $this->_remote_tls)) {
440
+        if (!$this->connect($this->_remote_host, $this->_remote_port, $this->_remote_tls)) {
441 441
             exit('FATAL: Could not reconnect to ('.$this->_remote_host.') after ('.$this->_reconnectRetries.') tries.'.PHP_EOL);
442 442
         }
443 443
 
444
-        if (! $this->_alreadyLoggedIn) {
445
-            if (! $this->login($this->_nickName, $this->_userName, $this->_realName, $this->_password)) {
444
+        if (!$this->_alreadyLoggedIn) {
445
+            if (!$this->login($this->_nickName, $this->_userName, $this->_realName, $this->_password)) {
446 446
                 exit('FATAL: Could not log in to ('.$this->_remote_host.')!'.PHP_EOL);
447 447
             }
448 448
 
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         do {
460 460
             stream_set_timeout($this->_socket, $this->_socket_timeout);
461 461
             $buffer .= fgets($this->_socket, 1024);
462
-        } while (! empty($buffer) && ! preg_match('/\v+$/', $buffer));
462
+        } while (!empty($buffer) && !preg_match('/\v+$/', $buffer));
463 463
         $this->_buffer = trim($buffer);
464 464
 
465 465
         if ($this->_debug && $this->_buffer !== '') {
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     protected function _connected(): bool
547 547
     {
548
-        return \is_resource($this->_socket) && ! feof($this->_socket);
548
+        return \is_resource($this->_socket) && !feof($this->_socket);
549 549
     }
550 550
 
551 551
     /**
Please login to merge, or discard this patch.
Blacklight/Games.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     {
299 299
         $browseBy = ' ';
300 300
         foreach ($this->getBrowseByOptions() as $bbk => $bbv) {
301
-            if (! empty($_REQUEST[$bbk])) {
301
+            if (!empty($_REQUEST[$bbk])) {
302 302
                 $bbs = stripslashes($_REQUEST[$bbk]);
303 303
                 if ($bbk === 'year') {
304 304
                     $browseBy .= ' AND YEAR (gi.releasedate) '.'LIKE '.escapeString('%'.$bbs.'%');
@@ -362,11 +362,11 @@  discard block
 block discarded – undo
362 362
                 if (empty($this->_gameResults['title'])) {
363 363
                     return false;
364 364
                 }
365
-                if (! empty($this->_gameResults['cover'])) {
365
+                if (!empty($this->_gameResults['cover'])) {
366 366
                     $game['coverurl'] = (string) $this->_gameResults['cover'];
367 367
                 }
368 368
 
369
-                if (! empty($this->_gameResults['backdrop'])) {
369
+                if (!empty($this->_gameResults['backdrop'])) {
370 370
                     $game['backdropurl'] = (string) $this->_gameResults['backdrop'];
371 371
                 }
372 372
 
@@ -374,41 +374,41 @@  discard block
 block discarded – undo
374 374
                 $game['asin'] = $this->_gameResults['steamid'];
375 375
                 $game['url'] = (string) $this->_gameResults['directurl'];
376 376
 
377
-                if (! empty($this->_gameResults['publisher'])) {
377
+                if (!empty($this->_gameResults['publisher'])) {
378 378
                     $game['publisher'] = (string) $this->_gameResults['publisher'];
379 379
                 } else {
380 380
                     $game['publisher'] = 'Unknown';
381 381
                 }
382 382
 
383
-                if (! empty($this->_gameResults['rating'])) {
383
+                if (!empty($this->_gameResults['rating'])) {
384 384
                     $game['esrb'] = (string) $this->_gameResults['rating'];
385 385
                 } else {
386 386
                     $game['esrb'] = 'Not Rated';
387 387
                 }
388 388
 
389
-                if (! empty($this->_gameResults['releasedate'])) {
389
+                if (!empty($this->_gameResults['releasedate'])) {
390 390
                     $dateReleased = strtotime($this->_gameResults['releasedate']) === false ? '' : $this->_gameResults['releasedate'];
391 391
                     $game['releasedate'] = ($this->_gameResults['releasedate'] === '' || strtotime($this->_gameResults['releasedate']) === false) ? null : Carbon::createFromFormat('M j, Y', Carbon::parse($dateReleased)->toFormattedDateString())->format('Y-m-d');
392 392
                 }
393 393
 
394
-                if (! empty($this->_gameResults['description'])) {
394
+                if (!empty($this->_gameResults['description'])) {
395 395
                     $game['review'] = (string) $this->_gameResults['description'];
396 396
                 }
397 397
 
398
-                if (! empty($this->_gameResults['genres'])) {
398
+                if (!empty($this->_gameResults['genres'])) {
399 399
                     $genres = $this->_gameResults['genres'];
400 400
                     $genreName = $this->_matchGenre($genres);
401 401
                 }
402 402
             }
403 403
         }
404 404
 
405
-        if (! empty($this->publicKey)) {
405
+        if (!empty($this->publicKey)) {
406 406
             if ($steamGameID === false || $this->_gameResults === false) {
407 407
                 $bestMatch = false;
408 408
                 $this->_classUsed = 'GiantBomb';
409 409
                 try {
410 410
                     $result = $this->giantBomb->search($gameInfo['title'], 'Game');
411
-                    if (! \is_object($result)) {
411
+                    if (!\is_object($result)) {
412 412
                         $bestMatchPct = 0;
413 413
                         foreach ($result as $res) {
414 414
                             similar_text(strtolower($gameInfo['title']), strtolower($res->name), $percent1);
@@ -421,17 +421,17 @@  discard block
 block discarded – undo
421 421
                         if ($bestMatch !== false) {
422 422
                             $this->_gameResults = $this->giantBomb->findWithResourceID('Game', '3030-'.$bestMatch);
423 423
 
424
-                            if (! empty($this->_gameResults->image['medium_url'])) {
424
+                            if (!empty($this->_gameResults->image['medium_url'])) {
425 425
                                 $game['coverurl'] = (string) $this->_gameResults->image['medium_url'];
426 426
                             }
427 427
 
428
-                            if (! empty($this->_gameResults->image['screen_url'])) {
428
+                            if (!empty($this->_gameResults->image['screen_url'])) {
429 429
                                 $game['backdropurl'] = (string) $this->_gameResults->image['screen_url'];
430 430
                             }
431 431
 
432 432
                             $game['title'] = (string) $this->_gameResults->get('name');
433 433
                             $game['asin'] = $this->_gameResults->get('id');
434
-                            if (! empty($this->_gameResults->get('site_detail_url'))) {
434
+                            if (!empty($this->_gameResults->get('site_detail_url'))) {
435 435
                                 $game['url'] = (string) $this->_gameResults->get('site_detail_url');
436 436
                             } else {
437 437
                                 $game['url'] = '';
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                                 $game['publisher'] = 'Unknown';
444 444
                             }
445 445
 
446
-                            if (! empty($this->_gameResults->original_game_rating[0]['name'])) {
446
+                            if (!empty($this->_gameResults->original_game_rating[0]['name'])) {
447 447
                                 $game['esrb'] = $this->_gameResults->original_game_rating[0]['name'] ?? 'Not Rated';
448 448
                             } else {
449 449
                                 $game['esrb'] = 'Not Rated';
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                     $bestMatch = false;
481 481
                     $this->_classUsed = 'IGDB';
482 482
                     $result = Game::where('name', $gameInfo['title'])->get();
483
-                    if (! empty($result)) {
483
+                    if (!empty($result)) {
484 484
                         $bestMatchPct = 0;
485 485
                         foreach ($result as $res) {
486 486
                             similar_text(strtolower($gameInfo['title']), strtolower($res->name), $percent1);
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
                             ])->where('id', $bestMatch)->first();
499 499
 
500 500
                             $publishers = [];
501
-                            if (! empty($this->_gameResults->involved_companies)) {
501
+                            if (!empty($this->_gameResults->involved_companies)) {
502 502
                                 foreach ($this->_gameResults->involved_companies as $publisher) {
503 503
                                     if ($publisher['publisher'] === true) {
504 504
                                         $company = Company::find($publisher['company']);
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 
510 510
                             $genres = [];
511 511
 
512
-                            if (! empty($this->_gameResults->themes)) {
512
+                            if (!empty($this->_gameResults->themes)) {
513 513
                                 foreach ($this->_gameResults->themes as $theme) {
514 514
                                     $genres[] = $theme['name'];
515 515
                                 }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                                 'esrb' => isset($this->_gameResults->aggregated_rating) ? round($this->_gameResults->aggregated_rating).'%' : 'Not Rated',
532 532
                                 'url' => $this->_gameResults->url ?? '',
533 533
                                 'backdropurl' => isset($this->_gameResults->screenshots) ? 'https:'.str_replace('t_thumb', 't_cover_big', $this->_gameResults->screenshots[0]['url']) : '',
534
-                                'publisher' => ! empty($publishers) ? implode(',', $publishers) : 'Unknown',
534
+                                'publisher' => !empty($publishers) ? implode(',', $publishers) : 'Unknown',
535 535
                             ];
536 536
                         } else {
537 537
                             $this->colorCli->notice('IGDB returned no valid results');
@@ -565,20 +565,20 @@  discard block
 block discarded – undo
565 565
         } else {
566 566
             $game['backdrop'] = 0;
567 567
         }
568
-        if (! isset($game['trailer'])) {
568
+        if (!isset($game['trailer'])) {
569 569
             $game['trailer'] = 0;
570 570
         }
571 571
         if (empty($game['title'])) {
572 572
             $game['title'] = $gameInfo['title'];
573 573
         }
574
-        if (! isset($game['releasedate'])) {
574
+        if (!isset($game['releasedate'])) {
575 575
             $game['releasedate'] = '';
576 576
         }
577 577
 
578 578
         if ($game['releasedate'] === '') {
579 579
             $game['releasedate'] = '';
580 580
         }
581
-        if (! isset($game['review'])) {
581
+        if (!isset($game['review'])) {
582 582
             $game['review'] = 'No Review';
583 583
         }
584 584
         $game['classused'] = $this->_classUsed;
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         $game['gamesgenre'] = $genreName;
597 597
         $game['gamesgenreID'] = $genreKey;
598 598
 
599
-        if (! empty($game['asin'])) {
599
+        if (!empty($game['asin'])) {
600 600
             $check = GamesInfo::query()->where('asin', $game['asin'])->first();
601 601
             if ($check === null) {
602 602
                 $gamesId = GamesInfo::query()
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
             }
642 642
         }
643 643
 
644
-        if (! empty($gamesId)) {
644
+        if (!empty($gamesId)) {
645 645
             if ($this->echoOutput) {
646 646
                 $this->colorCli->header('Added/updated game: ').
647 647
                 $this->colorCli->alternateOver('   Title:    ').
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
             $this->colorCli->primary($game['title'].' (PC)');
661 661
         }
662 662
 
663
-        return ! empty($gamesId) ? $gamesId : false;
663
+        return !empty($gamesId) ? $gamesId : false;
664 664
     }
665 665
 
666 666
     /**
Please login to merge, or discard this patch.