Completed
Branch develop (6af1b6)
by Henry
08:27
created
src/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
 
44 44
     public function config($Label)
45 45
     {
46
-        $Config = $this->ApplicationPath . '/config/' . $Label . '.php';
46
+        $Config = $this->ApplicationPath.'/config/'.$Label.'.php';
47 47
         if (!file_exists($Config)) {
48
-            throw new \Exception($Config . ' not found in '.static::class.'::config()');
48
+            throw new \Exception($Config.' not found in '.static::class.'::config()');
49 49
         }
50 50
         return require $Config;
51 51
     }
Please login to merge, or discard this patch.
src/Models/Media/Media.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public static $searchConditions = [
82 82
         'Caption' => [
83
-            'qualifiers' => ['any','caption'],
83
+            'qualifiers' => ['any', 'caption'],
84 84
             'points' => 2,
85 85
             'sql' => 'Caption LIKE "%%%s%%"',
86 86
         ],
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     public static $defaultFilenameFormat = 'default.%s.jpg';
110 110
     public static $newDirectoryPermissions = 0775;
111 111
     public static $newFilePermissions = 0664;
112
-    public static $magicPath = null;//'/usr/share/misc/magic.mgc';
112
+    public static $magicPath = null; //'/usr/share/misc/magic.mgc';
113 113
     public static $useFaceDetection = true;
114 114
     public static $faceDetectionTimeLimit = 10;
115 115
 
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 
629 629
     public static function getBlankPath($contextClass)
630 630
     {
631
-        $path = ['site-root','img',sprintf(static::$defaultFilenameFormat, $contextClass)];
631
+        $path = ['site-root', 'img', sprintf(static::$defaultFilenameFormat, $contextClass)];
632 632
 
633 633
         if ($node = Site::resolvePath($path)) {
634 634
             return $node->RealPath;
Please login to merge, or discard this patch.
src/Models/Auth/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             $Session->setFields($sessionData);
114 114
             if (function_exists('fastcgi_finish_request')) {
115 115
                 // @codeCoverageIgnoreStart
116
-                register_shutdown_function(function ($Session) {
116
+                register_shutdown_function(function($Session) {
117 117
                     $Session->save();
118 118
                 }, $Session);
119 119
             // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
src/Controllers/MediaRequestHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public $searchConditions = [
41 41
         'Caption' => [
42
-            'qualifiers' => ['any','caption']
42
+            'qualifiers' => ['any', 'caption']
43 43
             ,'points' => 2
44 44
             ,'sql' => 'Caption LIKE "%%%s%%"',
45 45
         ]
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         } elseif ($_SERVER['REQUEST_METHOD'] == 'PUT') {
192 192
             $put = fopen(static::$inputStream, 'r'); // open input stream
193 193
 
194
-            $tmp = tempnam('/tmp', 'dvr');  // use PHP to make a temporary file
194
+            $tmp = tempnam('/tmp', 'dvr'); // use PHP to make a temporary file
195 195
             $fp = fopen($tmp, 'w'); // open write stream to temp file
196 196
 
197 197
             // write
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         }
228 228
 
229 229
         return $this->respond('uploadComplete', [
230
-            'success' => (boolean)$Media
230
+            'success' => (boolean) $Media
231 231
             ,'data' => $Media,
232 232
         ]);
233 233
     }
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
             }
278 278
 
279 279
             // send caching headers
280
-            $expires = 60*60*24*365;
280
+            $expires = 60 * 60 * 24 * 365;
281 281
             if (!headers_sent()) {
282 282
                 // @codeCoverageIgnoreStart
283 283
                 header("Cache-Control: public, max-age=$expires");
284
-                header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires));
284
+                header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires));
285 285
                 header('Pragma: public');
286 286
                 // @codeCoverageIgnoreEnd
287 287
             }
@@ -524,9 +524,9 @@  discard block
 block discarded – undo
524 524
         // send caching headers
525 525
         if (!headers_sent()) {
526 526
             // @codeCoverageIgnoreStart
527
-            $expires = 60*60*24*365;
527
+            $expires = 60 * 60 * 24 * 365;
528 528
             header("Cache-Control: public, max-age=$expires");
529
-            header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires));
529
+            header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires));
530 530
             header('Pragma: public');
531 531
             // @codeCoverageIgnoreEnd
532 532
         }
Please login to merge, or discard this patch.
src/Models/SetMappers/DefaultSetMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@
 block discarded – undo
28 28
 
29 29
     public function setBooleanValue($value): bool
30 30
     {
31
-        return (boolean)$value;
31
+        return (boolean) $value;
32 32
     }
33 33
 
34 34
     public function setDecimalValue($value): ?float
35 35
     {
36
-        return is_null($value) ? null : (float)preg_replace('/[^-\d.]/', '', $value);
36
+        return is_null($value) ? null : (float) preg_replace('/[^-\d.]/', '', $value);
37 37
     }
38 38
 
39 39
     public function setIntegerValue($value): ?int
40 40
     {
41
-        return is_null($value) ? null : (int)preg_replace('/[^-\d]/', '', $value);
41
+        return is_null($value) ? null : (int) preg_replace('/[^-\d]/', '', $value);
42 42
     }
43 43
 
44 44
     public function setTimestampValue($value): ?string
Please login to merge, or discard this patch.
src/Models/Getters.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         return DB::oneRecord(
166 166
             (new Select())->setTable(static::$tableName)->where(join(') AND (', $conditions))->order($order ? join(',', $order) : '')->limit('1'),
167 167
             null,
168
-            [static::class,'handleError']
168
+            [static::class, 'handleError']
169 169
         );
170 170
     }
171 171
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public static function getByQuery($query, $params = [])
180 180
     {
181
-        return static::instantiateRecord(DB::oneRecord($query, $params, [static::class,'handleError']));
181
+        return static::instantiateRecord(DB::oneRecord($query, $params, [static::class, 'handleError']));
182 182
     }
183 183
 
184 184
     /**
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
             $select->limit(sprintf('%u,%u', $options['offset'], $options['limit']));
285 285
         }
286 286
         if ($options['indexField']) {
287
-            return DB::table(static::_cn($options['indexField']), $select, null, null, [static::class,'handleError']);
287
+            return DB::table(static::_cn($options['indexField']), $select, null, null, [static::class, 'handleError']);
288 288
         } else {
289
-            return DB::allRecords($select, null, [static::class,'handleError']);
289
+            return DB::allRecords($select, null, [static::class, 'handleError']);
290 290
         }
291 291
     }
292 292
 
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public static function getAllByQuery($query, $params = [])
301 301
     {
302
-        return static::instantiateRecords(DB::allRecords($query, $params, [static::class,'handleError']));
302
+        return static::instantiateRecords(DB::allRecords($query, $params, [static::class, 'handleError']));
303 303
     }
304 304
 
305 305
     public static function getTableByQuery($keyField, $query, $params = [])
306 306
     {
307
-        return static::instantiateRecords(DB::table($keyField, $query, $params, [static::class,'handleError']));
307
+        return static::instantiateRecords(DB::table($keyField, $query, $params, [static::class, 'handleError']));
308 308
     }
309 309
 
310 310
     /**
@@ -362,9 +362,9 @@  discard block
 block discarded – undo
362 362
         }
363 363
 
364 364
         if ($options['indexField']) {
365
-            return DB::table(static::_cn($options['indexField']), $select, null, null, [static::class,'handleError']);
365
+            return DB::table(static::_cn($options['indexField']), $select, null, null, [static::class, 'handleError']);
366 366
         } else {
367
-            return DB::allRecords($select, null, [static::class,'handleError']);
367
+            return DB::allRecords($select, null, [static::class, 'handleError']);
368 368
         }
369 369
     }
370 370
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                     return ', '.$value.' AS '.$key;
435 435
                 }
436 436
             } else {
437
-                return ', ' . $columns;
437
+                return ', '.$columns;
438 438
             }
439 439
         }
440 440
     }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     public static function buildHaving($having)
449 449
     {
450 450
         if (!empty($having)) {
451
-            return ' (' . (is_array($having) ? join(') AND (', static::_mapConditions($having)) : $having) . ')';
451
+            return ' ('.(is_array($having) ? join(') AND (', static::_mapConditions($having)) : $having).')';
452 452
         }
453 453
     }
454 454
 }
Please login to merge, or discard this patch.
src/Models/Versioning.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
             // save a copy to history table
154 154
             $recordValues = $this->_prepareRecordValues();
155 155
             $set = static::_mapValuesToSet($recordValues);
156
-            DB::nonQuery((new Insert())->setTable(static::getHistoryTable())->set($set), null, [static::class,'handleError']);
156
+            DB::nonQuery((new Insert())->setTable(static::getHistoryTable())->set($set), null, [static::class, 'handleError']);
157 157
         }
158 158
     }
159 159
 }
Please login to merge, or discard this patch.
src/IO/Database/Query/Select.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
 
52 52
     public function __toString(): string
53 53
     {
54
-        $expression = ($this->calcFoundRows ? 'SQL_CALC_FOUND_ROWS ' : '') . $this->expression;
54
+        $expression = ($this->calcFoundRows ? 'SQL_CALC_FOUND_ROWS ' : '').$this->expression;
55 55
 
56 56
         if (isset($this->tableAlias)) {
57 57
             $from = sprintf('`%s` AS `%s`', $this->table, $this->tableAlias);
Please login to merge, or discard this patch.