Test Setup Failed
Pull Request — master (#522)
by Mike's
10:08 queued 03:02
created
base.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 function notFound()
61 61
 {
62
-    header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
62
+    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
63 63
     header('Status: 404 Not Found');
64 64
 
65 65
     $_SERVER['REDIRECT_STATUS'] = 404;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 function xml2xhtml($xml)
109 109
 {
110
-    return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', function ($m) {
110
+    return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', function($m) {
111 111
         $xhtml_tags = ['br', 'hr', 'input', 'frame', 'img', 'area', 'link', 'col', 'base', 'basefont', 'param'];
112 112
         if (in_array($m[1], $xhtml_tags)) {
113 113
             return '<' . $m[1] . $m[2] . ' />';
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     libxml_use_internal_errors(true);
164 164
 
165 165
     $doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' .
166
-                        $html  . '</body></html>'); // Load the HTML
166
+                        $html . '</body></html>'); // Load the HTML
167 167
     $output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
168 168
     $output = xml2xhtml($output);
169 169
     if (preg_match('#<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></meta></head><body>(.*)</body></html>#ms', $output, $matches)) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     //echo var_dump($langs);
271 271
     $lang_file = null;
272 272
     foreach ($langs as $language => $val) {
273
-        $temp_file = dirname(__FILE__). '/lang/Localization_' . $language . '.json';
273
+        $temp_file = dirname(__FILE__) . '/lang/Localization_' . $language . '.json';
274 274
         if (file_exists($temp_file)) {
275 275
             $lang = $language;
276 276
             $lang_file = $temp_file;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         }
279 279
     }
280 280
     if (empty($lang_file)) {
281
-        $lang_file = dirname(__FILE__). '/lang/Localization_' . $lang . '.json';
281
+        $lang_file = dirname(__FILE__) . '/lang/Localization_' . $lang . '.json';
282 282
     }
283 283
     return [$lang, $lang_file];
284 284
 }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
  * This method is based on this page
288 288
  * http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/
289 289
  */
290
-function localize($phrase, $count=-1, $reset=false)
290
+function localize($phrase, $count = -1, $reset = false)
291 291
 {
292 292
     global $config;
293 293
     if ($count == 0) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         $lang_file_en = null;
311 311
         [$lang, $lang_file] = getLangAndTranslationFile();
312 312
         if ($lang != 'en') {
313
-            $lang_file_en = dirname(__FILE__). '/lang/' . 'Localization_en.json';
313
+            $lang_file_en = dirname(__FILE__) . '/lang/' . 'Localization_en.json';
314 314
         }
315 315
 
316 316
         $lang_file_content = file_get_contents($lang_file);
Please login to merge, or discard this patch.
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.