Test Setup Failed
Pull Request — master (#522)
by Mike's
01:01
created
checkconfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             <h4>
202 202
             <?php
203 203
     try {
204
-        $db = new PDO('sqlite:'. Base::getDbFileName($i));
204
+        $db = new PDO('sqlite:' . Base::getDbFileName($i));
205 205
         echo $name . ' OK';
206 206
     } catch (Exception $e) {
207 207
         echo $name . ' If the file is readable, check your php configuration. Exception detail : ' . $e;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             <h4>
215 215
             <?php
216 216
         try {
217
-            $db = new PDO('sqlite:'. Base::getDbFileName($i));
217
+            $db = new PDO('sqlite:' . Base::getDbFileName($i));
218 218
             $count = $db->query('select count(*) FROM sqlite_master WHERE type="table" AND name in ("books", "authors", "tags", "series")')->fetchColumn();
219 219
             if ($count == 4) {
220 220
                 echo $name . ' OK';
Please login to merge, or discard this patch.
lib/Book.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -196,17 +196,17 @@  discard block
 block discarded – undo
196 196
 
197 197
     public function getEntryId()
198 198
     {
199
-        return self::ALL_BOOKS_UUID.':'.$this->uuid;
199
+        return self::ALL_BOOKS_UUID . ':' . $this->uuid;
200 200
     }
201 201
 
202 202
     public static function getEntryIdByLetter($startingLetter)
203 203
     {
204
-        return self::ALL_BOOKS_ID.':letter:'.$startingLetter;
204
+        return self::ALL_BOOKS_ID . ':letter:' . $startingLetter;
205 205
     }
206 206
 
207 207
     public function getUri()
208 208
     {
209
-        return '?page='.parent::PAGE_BOOK_DETAIL.'&id=' . $this->id;
209
+        return '?page=' . parent::PAGE_BOOK_DETAIL . '&id=' . $this->id;
210 210
     }
211 211
 
212 212
     public function getDetailUrl()
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
 
239 239
     public function getAuthorsName()
240 240
     {
241
-        return implode(', ', array_map(function ($author) {
241
+        return implode(', ', array_map(function($author) {
242 242
             return $author->name;
243 243
         }, $this->getAuthors()));
244 244
     }
245 245
 
246 246
     public function getAuthorsSort()
247 247
     {
248
-        return implode(', ', array_map(function ($author) {
248
+        return implode(', ', array_map(function($author) {
249 249
             return $author->sort;
250 250
         }, $this->getAuthors()));
251 251
     }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
     public function getTagsName()
312 312
     {
313
-        return implode(', ', array_map(function ($tag) {
313
+        return implode(', ', array_map(function($tag) {
314 314
             return $tag->name;
315 315
         }, $this->getTags()));
316 316
     }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
     public function getDataById($idData)
389 389
     {
390
-        $reduced = array_filter($this->getDatas(), function ($data) use ($idData) {
390
+        $reduced = array_filter($this->getDatas(), function($data) use ($idData) {
391 391
             return $data->id == $idData;
392 392
         });
393 393
         return reset($reduced);
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         if (empty($this->pubdate)) {
414 414
             return '';
415 415
         }
416
-        $dateY = (int) substr($this->pubdate, 0, 4);
416
+        $dateY = (int)substr($this->pubdate, 0, 4);
417 417
         if ($dateY > 102) {
418 418
             return str_pad($dateY, 4, '0', STR_PAD_LEFT);
419 419
         }
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
     public function getDataFormat($format)
438 438
     {
439
-        $reduced = array_filter($this->getDatas(), function ($data) use ($format) {
439
+        $reduced = array_filter($this->getDatas(), function($data) use ($format) {
440 440
             return $data->format == $format;
441 441
         });
442 442
         return reset($reduced);
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
                 $epub->SerieIndex($this->seriesIndex);
512 512
             }
513 513
             $filename = $data->getUpdatedFilenameEpub();
514
-            if ($config['cops_provide_kepub'] == '1'  && preg_match('/Kobo/', $_SERVER['HTTP_USER_AGENT'])) {
514
+            if ($config['cops_provide_kepub'] == '1' && preg_match('/Kobo/', $_SERVER['HTTP_USER_AGENT'])) {
515 515
                 $epub->updateForKepub();
516 516
                 $filename = $data->getUpdatedFilenameKepub();
517 517
             }
@@ -540,13 +540,13 @@  discard block
 block discarded – undo
540 540
                 if ($nw >= $w) {
541 541
                     return false;
542 542
                 }
543
-                $nh = intval(($nw*$h)/$w);
543
+                $nh = intval(($nw * $h) / $w);
544 544
             } else {
545 545
                 $nh = $height;
546 546
                 if ($nh >= $h) {
547 547
                     return false;
548 548
                 }
549
-                $nw = intval(($nh*$w)/$h);
549
+                $nw = intval(($nh * $w) / $h);
550 550
             }
551 551
         } else {
552 552
             return false;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
             self::ALL_BOOKS_ID,
643 643
             str_format(localize('allbooks.alphabetical', $nBooks), $nBooks),
644 644
             'text',
645
-            [new LinkNavigation('?page='.parent::PAGE_ALL_BOOKS)],
645
+            [new LinkNavigation('?page=' . parent::PAGE_ALL_BOOKS)],
646 646
             '',
647 647
             $nBooks
648 648
         );
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
                 self::ALL_RECENT_BOOKS_ID,
654 654
                 str_format(localize('recent.list'), $config['cops_recentbooks_limit']),
655 655
                 'text',
656
-                [ new LinkNavigation('?page='.parent::PAGE_ALL_RECENT_BOOKS)],
656
+                [new LinkNavigation('?page=' . parent::PAGE_ALL_RECENT_BOOKS)],
657 657
                 '',
658 658
                 $config['cops_recentbooks_limit']
659 659
             );
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
                 Book::getEntryIdByLetter($post->title),
781 781
                 str_format(localize('bookword', $post->count), $post->count),
782 782
                 'text',
783
-                [new LinkNavigation('?page='.parent::PAGE_ALL_BOOKS_LETTER.'&id='. rawurlencode($post->title))],
783
+                [new LinkNavigation('?page=' . parent::PAGE_ALL_BOOKS_LETTER . '&id=' . rawurlencode($post->title))],
784 784
                 '',
785 785
                 $post->count
786 786
             ));
Please login to merge, or discard this patch.