Passed
Push — master ( 963665...3c80d9 )
by Nicolaas
02:53
created
src/Files/OneFileInfo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function toArray(): array
109 109
     {
110 110
         $cachekey = $this->getCacheKey();
111
-        if (! $this->hasCacheKey($cachekey) || $this->noCache) {
111
+        if (!$this->hasCacheKey($cachekey) || $this->noCache) {
112 112
             $this->collateIntel();
113 113
             if ($this->debug) {
114 114
                 if ($this->intel['ErrorHasAnyError']) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 } else {
239 239
                     $this->intel['ImageRatio'] = 0;
240 240
                 }
241
-                $this->intel['ImagePixels'] =  $this->intel['ImageHeight'] * $this->intel['ImageWidth'];
241
+                $this->intel['ImagePixels'] = $this->intel['ImageHeight'] * $this->intel['ImageWidth'];
242 242
                 $this->intel['IsResizedImage'] = (bool) strpos($this->intel['PathFileName'], '__');
243 243
             }
244 244
         }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     {
249 249
         $folder = [];
250 250
         $hasFolder = false;
251
-        if (! empty($dbFileData['ParentID'])) {
251
+        if (!empty($dbFileData['ParentID'])) {
252 252
             $sql = 'SELECT ID FROM "File" WHERE "ID" = ' . $dbFileData['ParentID'] . ' LIMIT 1';
253 253
             $rows = DB::query($sql);
254 254
             foreach ($rows as $folder) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             $this->intel['FolderID'] = $folder['ID'];
263 263
             $this->intel['FolderCMSEditLink'] = '/admin/assets/show/' . $this->intel['FolderID'] . '/';
264 264
         } else {
265
-            $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']);
265
+            $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']);
266 266
             $this->intel['FolderID'] = 0;
267 267
             $this->intel['FolderCMSEditLink'] = '/admin/assets';
268 268
         }
@@ -306,14 +306,14 @@  discard block
 block discarded – undo
306 306
             $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']);
307 307
             $existsOnStaging = $obj->existsOnStaging($this->intel['DBID']);
308 308
             $existsOnLive = $obj->existsOnLive($this->intel['DBID']);
309
-            $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging;
310
-            $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive;
311
-            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive;
312
-            $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive;
309
+            $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging;
310
+            $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive;
311
+            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive;
312
+            $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive;
313 313
             $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit';
314 314
             $this->intel['DBTitle'] = $dbFileData['Title'];
315 315
             $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename'] ?? 'none';
316
-            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none';;
316
+            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none'; ;
317 317
             $this->intel['ErrorInFilename'] = $this->intel['Path'] !== $this->intel['DBPath'];
318 318
             $ss3FileName = $dbFileData['Filename'] ?? '';
319 319
             if ('assets/' === substr((string) $ss3FileName, 0, strlen('assets/'))) {
Please login to merge, or discard this patch.