Test Setup Failed
Pull Request — master (#522)
by Mike's
01:01
created
lib/PageCustomize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
         $content = "";
118 118
         foreach ($ignoredBaseArray as $key) {
119 119
             $keyPlural = preg_replace('/(ss)$/', 's', $key . "s");
120
-            $content .=  '<input type="checkbox" name="ignored_categories[]" onchange="updateCookieFromCheckboxGroup (this);" id="ignored_categories_' . $key . '" ' . $this->isChecked("ignored_categories", $key) . ' > ' . localize("{$keyPlural}.title") . '</input> ';
120
+            $content .= '<input type="checkbox" name="ignored_categories[]" onchange="updateCookieFromCheckboxGroup (this);" id="ignored_categories_' . $key . '" ' . $this->isChecked("ignored_categories", $key) . ' > ' . localize("{$keyPlural}.title") . '</input> ';
121 121
         }
122 122
 
123 123
         array_push($this->entryArray, new Entry(
Please login to merge, or discard this patch.
lib/Serie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
 
25 25
     public function getUri()
26 26
     {
27
-        return "?page=".parent::PAGE_SERIE_DETAIL."&id=$this->id";
27
+        return "?page=" . parent::PAGE_SERIE_DETAIL . "&id=$this->id";
28 28
     }
29 29
 
30 30
     public function getEntryId()
31 31
     {
32
-        return self::ALL_SERIES_ID.":".$this->id;
32
+        return self::ALL_SERIES_ID . ":" . $this->id;
33 33
     }
34 34
 
35 35
     public static function getCount()
Please login to merge, or discard this patch.
lib/Publisher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
 
26 26
     public function getUri()
27 27
     {
28
-        return "?page=".parent::PAGE_PUBLISHER_DETAIL."&id=$this->id";
28
+        return "?page=" . parent::PAGE_PUBLISHER_DETAIL . "&id=$this->id";
29 29
     }
30 30
 
31 31
     public function getEntryId()
32 32
     {
33
-        return self::ALL_PUBLISHERS_ID.":".$this->id;
33
+        return self::ALL_PUBLISHERS_ID . ":" . $this->id;
34 34
     }
35 35
 
36 36
     public static function getCount()
Please login to merge, or discard this patch.
lib/JSON_renderer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
     public static function getContentArray($entry)
119 119
     {
120 120
         if ($entry instanceof EntryBook) {
121
-            $out = [ "title" => $entry->title];
121
+            $out = ["title" => $entry->title];
122 122
             $out ["book"] = self::getBookContentArray($entry->book);
123 123
             return $out;
124 124
         }
125
-        return [ "title" => $entry->title, "content" => $entry->content, "navlink" => $entry->getNavLink(), "number" => $entry->numberOfElement ];
125
+        return ["title" => $entry->title, "content" => $entry->content, "navlink" => $entry->getNavLink(), "number" => $entry->numberOfElement];
126 126
     }
127 127
 
128 128
     public static function getContentArrayTypeahead($page)
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             return self::getContentArrayTypeahead($currentPage);
209 209
         }
210 210
 
211
-        $out = [ "title" => $currentPage->title];
211
+        $out = ["title" => $currentPage->title];
212 212
         $entries = [];
213 213
         foreach ($currentPage->entryArray as $entry) {
214 214
             array_push($entries, self::getContentArray($entry));
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             $out ["fullTitle"] = $out ["databaseName"] . " > " . $out ["fullTitle"];
227 227
         }
228 228
         $out ["page"] = $page;
229
-        $out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled() ? 1 : 0;
229
+        $out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled()?1:0;
230 230
         $out ["entries"] = $entries;
231 231
         $out ["isPaginated"] = 0;
232 232
         if ($currentPage->isPaginated()) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
         $out ["homeurl"] = "index.php";
264 264
         if ($page != Base::PAGE_INDEX && !is_null($database)) {
265
-            $out ["homeurl"] = $out ["homeurl"] .  "?" . addURLParameter("", DB, $database);
265
+            $out ["homeurl"] = $out ["homeurl"] . "?" . addURLParameter("", DB, $database);
266 266
         }
267 267
 
268 268
         return $out;
Please login to merge, or discard this patch.
lib/Base.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     public static function getDbFileName($database = null)
113 113
     {
114
-        return self::getDbDirectory($database) .'metadata.db';
114
+        return self::getDbDirectory($database) . 'metadata.db';
115 115
     }
116 116
 
117 117
     private static function error($database)
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         if (is_null(self::$db)) {
128 128
             try {
129 129
                 if (is_readable(self::getDbFileName($database))) {
130
-                    self::$db = new PDO('sqlite:'. self::getDbFileName($database));
130
+                    self::$db = new PDO('sqlite:' . self::getDbFileName($database));
131 131
                     if (useNormAndUp()) {
132 132
                         self::$db->sqliteCreateFunction('normAndUp', 'normAndUp', 1);
133 133
                     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $id,
179 179
             str_format(localize($numberOfString, $count), $count),
180 180
             "text",
181
-            [ new LinkNavigation("?page=".$pageId)],
181
+            [new LinkNavigation("?page=" . $pageId)],
182 182
             "",
183 183
             $count
184 184
         );
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 $instance->getEntryId(),
206 206
                 str_format(localize("bookword", $post->count), $post->count),
207 207
                 "text",
208
-                [ new LinkNavigation($instance->getUri())],
208
+                [new LinkNavigation($instance->getUri())],
209 209
                 "",
210 210
                 $post->count
211 211
             ));
Please login to merge, or discard this patch.
lib/CustomColumnTypeBool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
     // PHP pre 5.6 does not support const arrays
12 12
     private $BOOLEAN_NAMES = [
13 13
         -1 => "customcolumn.boolean.unknown", // localize("customcolumn.boolean.unknown")
14
-        0 => "customcolumn.boolean.no",      // localize("customcolumn.boolean.no")
15
-        +1 => "customcolumn.boolean.yes",     // localize("customcolumn.boolean.yes")
14
+        0 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no")
15
+        +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes")
16 16
     ];
17 17
 
18 18
     protected function __construct($pcustomId)
Please login to merge, or discard this patch.
epubreader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
         Monocle.DEBUG = true;
38 38
         var bookData = {
39 39
           getComponents: function() {
40
-            <?php echo 'return [' . implode(', ', array_map(function ($comp) {
40
+            <?php echo 'return [' . implode(', ', array_map(function($comp) {
41 41
                 return "'" . $comp . "'";
42 42
             }, $book->components())) . '];'; ?>
43 43
           },
44 44
           getContents: function() {
45
-            <?php echo 'return [' . implode(', ', array_map(function ($content) {
46
-                return "{title: '" . addslashes($content['title']) . "', src: '". $content['src'] . "'}";
45
+            <?php echo 'return [' . implode(', ', array_map(function($content) {
46
+                return "{title: '" . addslashes($content['title']) . "', src: '" . $content['src'] . "'}";
47 47
             }, $book->contents())) . '];'; ?>
48 48
           },
49 49
           getComponent: function (componentId) {
Please login to merge, or discard this patch.
config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 }
14 14
 /** @var array $config */
15 15
 
16
-$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER) ? $_SERVER['PHP_AUTH_USER'] : '';
16
+$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER)?$_SERVER['PHP_AUTH_USER']:'';
17 17
 // Clean username, only allow a-z, A-Z, 0-9, -_ chars
18 18
 $remote_user = preg_replace('/[^a-zA-Z0-9_-]/', '', $remote_user);
19 19
 $user_config_file = 'config_local.' . $remote_user . '.php';
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     is_array($config['cops_basic_authentication'])) {
26 26
     if (!isset($_SERVER['PHP_AUTH_USER']) ||
27 27
         (isset($_SERVER['PHP_AUTH_USER']) &&
28
-        ($_SERVER['PHP_AUTH_USER']!=$config['cops_basic_authentication']['username'] ||
28
+        ($_SERVER['PHP_AUTH_USER'] != $config['cops_basic_authentication']['username'] ||
29 29
         $_SERVER['PHP_AUTH_PW'] != $config['cops_basic_authentication']['password']))) {
30 30
         header('WWW-Authenticate: Basic realm="COPS Authentication"');
31 31
         header('HTTP/1.0 401 Unauthorized');
Please login to merge, or discard this patch.
fetch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 // clean output buffers before sending the ebook data do avoid high memory usage on big ebooks (ie. comic books)
22 22
 ob_end_clean();
23 23
 
24
-$expires = 60*60*24*14;
24
+$expires = 60 * 60 * 24 * 14;
25 25
 header('Pragma: public');
26 26
 header('Cache-Control: max-age=' . $expires);
27
-header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
27
+header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT');
28 28
 $bookId   = getURLParam('id', null);
29 29
 $type     = getURLParam('type', 'jpg');
30 30
 $idData   = getURLParam('data', null);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         if (isset($config['cops_thumbnail_cache_directory']) && $config['cops_thumbnail_cache_directory'] !== '') {
62 62
             $thumbnailCacheFullpath = $config['cops_thumbnail_cache_directory'];
63 63
             //if multiple databases, add a subfolder with the database ID
64
-            $thumbnailCacheFullpath .= !is_null(GetUrlParam(DB)) ? 'db-' . GetUrlParam(DB) . DIRECTORY_SEPARATOR : '';
64
+            $thumbnailCacheFullpath .= !is_null(GetUrlParam(DB))?'db-' . GetUrlParam(DB) . DIRECTORY_SEPARATOR:'';
65 65
             //when there are lots of thumbnails, it's better to save files in subfolders, so if the book's uuid is
66 66
             //"01234567-89ab-cdef-0123-456789abcdef", we will save the thumbnail in .../0/12/34567-89ab-cdef-0123-456789abcdef-...
67 67
             $thumbnailCacheFullpath .= substr($book->uuid, 0, 1) . DIRECTORY_SEPARATOR . substr($book->uuid, 1, 2) . DIRECTORY_SEPARATOR;
Please login to merge, or discard this patch.