Passed
Push — develop ( 77591c...6dbd18 )
by Henry
02:12
created
src/Controllers/MediaRequestHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public $searchConditions = [
39 39
         'Caption' => [
40
-            'qualifiers' => ['any','caption']
40
+            'qualifiers' => ['any', 'caption']
41 41
             ,'points' => 2
42 42
             ,'sql' => 'Caption LIKE "%%%s%%"',
43 43
         ]
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         } elseif ($_SERVER['REQUEST_METHOD'] == 'PUT') {
190 190
             $put = fopen('php://input', 'r'); // open input stream
191 191
 
192
-            $tmp = tempnam('/tmp', 'dvr');  // use PHP to make a temporary file
192
+            $tmp = tempnam('/tmp', 'dvr'); // use PHP to make a temporary file
193 193
             $fp = fopen($tmp, 'w'); // open write stream to temp file
194 194
 
195 195
             // write
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         }
226 226
 
227 227
         return $this->respond('uploadComplete', [
228
-            'success' => (boolean)$Media
228
+            'success' => (boolean) $Media
229 229
             ,'data' => $Media
230 230
         ]);
231 231
     }
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
             }
274 274
 
275 275
             // send caching headers
276
-            $expires = 60*60*24*365;
276
+            $expires = 60 * 60 * 24 * 365;
277 277
             if (!headers_sent()) {
278 278
                 header("Cache-Control: public, max-age=$expires");
279
-                header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires));
279
+                header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires));
280 280
                 header('Pragma: public');
281 281
             }
282 282
 
@@ -505,9 +505,9 @@  discard block
 block discarded – undo
505 505
     public function handleThumbnailRequest(Media $Media = null): ResponseInterface
506 506
     {
507 507
         // send caching headers
508
-        $expires = 60*60*24*365;
508
+        $expires = 60 * 60 * 24 * 365;
509 509
         header("Cache-Control: public, max-age=$expires");
510
-        header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires));
510
+        header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires));
511 511
         header('Pragma: public');
512 512
 
513 513
 
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.