Passed
Push — master ( f94ab0...78a314 )
by Darko
05:45
created
Blacklight/Books.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 			%s
170 170
 			GROUP BY boo.id
171 171
 			ORDER BY %s %s',
172
-            \is_array($bookIDs) && ! empty($bookIDs) ? implode(',', $bookIDs) : -1,
173
-            \is_array($releaseIDs) && ! empty($releaseIDs) ? implode(',', $releaseIDs) : -1,
172
+            \is_array($bookIDs) && !empty($bookIDs) ? implode(',', $bookIDs) : -1,
173
+            \is_array($releaseIDs) && !empty($releaseIDs) ? implode(',', $releaseIDs) : -1,
174 174
             $catsrch,
175 175
             $order[0],
176 176
             $order[1]
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     {
236 236
         $browseby = ' ';
237 237
         foreach ($this->getBrowseByOptions() as $bbk => $bbv) {
238
-            if (! empty($_REQUEST[$bbk])) {
238
+            if (!empty($_REQUEST[$bbk])) {
239 239
                 $bbs = stripslashes($_REQUEST[$bbk]);
240 240
                 $browseby .= ' AND boo.'.$bbv.' '.'LIKE '.escapeString('%'.$bbs.'%');
241 241
             }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                 return false;
366 366
             }
367 367
 
368
-            if (preg_match('/^([a-z0-9ü!]+ ){1,2}(N|Vol)?\d{1,4}([abc])?$|^([a-z0-9]+ ){1,2}(Jan( |unar|$)|Feb( |ruary|$)|Mar( |ch|$)|Apr( |il|$)|May(?![a-z0-9])|Jun([ e$])|Jul([ y$])|Aug( |ust|$)|Sep( |tember|$)|O([ck])t( |ober|$)|Nov( |ember|$)|De([cz])( |ember|$))/ui', $releasename) && ! preg_match('/Part \d+/i', $releasename)) {
368
+            if (preg_match('/^([a-z0-9ü!]+ ){1,2}(N|Vol)?\d{1,4}([abc])?$|^([a-z0-9]+ ){1,2}(Jan( |unar|$)|Feb( |ruary|$)|Mar( |ch|$)|Apr( |il|$)|May(?![a-z0-9])|Jun([ e$])|Jul([ y$])|Aug( |ust|$)|Sep( |tember|$)|O([ck])t( |ober|$)|Nov( |ember|$)|De([cz])( |ember|$))/ui', $releasename) && !preg_match('/Part \d+/i', $releasename)) {
369 369
                 if ($this->echooutput) {
370 370
                     $this->colorCli->headerOver('Changing category to magazines: ').$this->colorCli->primary($releasename);
371 371
                 }
@@ -373,14 +373,14 @@  discard block
 block discarded – undo
373 373
 
374 374
                 return false;
375 375
             }
376
-            if (! empty($releasename) && ! preg_match('/^[a-z0-9]+$|^([0-9]+ ){1,}$|Part \d+/i', $releasename)) {
376
+            if (!empty($releasename) && !preg_match('/^[a-z0-9]+$|^([0-9]+ ){1,}$|Part \d+/i', $releasename)) {
377 377
                 return $releasename;
378 378
             }
379 379
 
380 380
             return false;
381 381
         }
382 382
         if ($releasetype === 'audiobook') {
383
-            if (! empty($releasename) && ! preg_match('/^[a-z0-9]+$|^([0-9]+ ){1,}$|Part \d+/i', $releasename)) {
383
+            if (!empty($releasename) && !preg_match('/^[a-z0-9]+$|^([0-9]+ ){1,}$|Part \d+/i', $releasename)) {
384 384
                 // we can skip category for audiobooks, since we already know it, so as long as the release name is valid return it so that it is postprocessed by amazon.  In the future, determining the type of audiobook could be added (Lecture or book), since we can skip lookups on lectures, but for now handle them all the same way
385 385
                 return $releasename;
386 386
             }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
         $book = false;
406 406
         if ($bookInfo !== '') {
407
-            if (! $book) {
407
+            if (!$book) {
408 408
                 $this->colorCli->info('Fetching data from iTunes for '.$bookInfo);
409 409
                 $book = $this->fetchItunesBookProperties($bookInfo);
410 410
             } elseif ($amazdata !== null) {
@@ -511,12 +511,12 @@  discard block
 block discarded – undo
511 511
                 'salesrank' => '',
512 512
                 'publisher' => '',
513 513
                 'pages' => '',
514
-                'coverurl' => ! empty($iTunesBook->getCover()) ? str_replace('100x100', '800x800', $iTunesBook->getCover()) : '',
514
+                'coverurl' => !empty($iTunesBook->getCover()) ? str_replace('100x100', '800x800', $iTunesBook->getCover()) : '',
515 515
                 'genre' => implode(', ', $iTunesBook->getGenre()),
516 516
                 'overview' => strip_tags($iTunesBook->getDescription()),
517 517
                 'publishdate' => $iTunesBook->getReleaseDate()->format('Y-m-d'),
518 518
             ];
519
-            if (! empty($book['coverurl'])) {
519
+            if (!empty($book['coverurl'])) {
520 520
                 $book['cover'] = 1;
521 521
             } else {
522 522
                 $book['cover'] = 0;
Please login to merge, or discard this patch.