Passed
Push — master ( 2243e7...bf7994 )
by Nicolaas
02:34
created
src/Files/AllFilesInfo.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     public function getStagingData(string $pathFromAssets, ?int $id = 0): array
209 209
     {
210
-        if (! $id) {
210
+        if (!$id) {
211 211
             $id = $this->databaseLookupListStaging[$pathFromAssets] ?? 0;
212 212
         }
213 213
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function getLiveData(string $pathFromAssets, ?int $id = 0): array
223 223
     {
224
-        if (! $id) {
224
+        if (!$id) {
225 225
             $id = $this->databaseLookupListLive[$pathFromAssets] ?? 0;
226 226
         }
227 227
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     protected function registerFile($path, ?bool $inFileSystem = true)
424 424
     {
425 425
         if ($path) {
426
-            if (! isset($this->listOfFiles[$path])) {
426
+            if (!isset($this->listOfFiles[$path])) {
427 427
                 $this->listOfFiles[$path] = $inFileSystem;
428 428
                 if ($this->debug) {
429 429
                     echo $inFileSystem ? '✓ ' : 'x ';
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
         $fileName = basename($absolutePath);
465 465
         $isErrorPage = ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
466
-        return ! $isErrorPage;
466
+        return !$isErrorPage;
467 467
     }
468 468
 
469 469
     protected function getArrayOfFilesOnDisk(): array
Please login to merge, or discard this patch.
src/Files/OneFileInfo.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function toArray(?bool $recalc = false): array
93 93
     {
94 94
         $cachekey = $this->getCacheKey();
95
-        if (! $this->hasCacheKey($cachekey) || $recalc) {
95
+        if (!$this->hasCacheKey($cachekey) || $recalc) {
96 96
             $this->getUncachedIntel();
97 97
             if ($this->debug) {
98 98
                 echo $this->intel['ErrorHasAnyError'] ? 'x ' : '✓ ';
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     protected function addFolderDetails($dbFileData)
246 246
     {
247 247
         $folder = [];
248
-        if (! empty($dbFileData['ParentID'])) {
248
+        if (!empty($dbFileData['ParentID'])) {
249 249
             if (isset($this->folderCache[$dbFileData['ParentID']])) {
250 250
                 $folder = $this->folderCache[$dbFileData['ParentID']];
251 251
             } else {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         }
259 259
 
260 260
         if (empty($folder)) {
261
-            $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']);
261
+            $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']);
262 262
             $this->intel['FolderID'] = 0;
263 263
         } else {
264 264
             $this->intel['ErrorFindingFolder'] = false;
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
             $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']);
304 304
             $existsOnStaging = $obj->existsOnStaging($this->intel['DBID']);
305 305
             $existsOnLive = $obj->existsOnLive($this->intel['DBID']);
306
-            $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging;
307
-            $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive;
308
-            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive;
309
-            $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive;
306
+            $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging;
307
+            $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive;
308
+            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive;
309
+            $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive;
310 310
             $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit';
311 311
             $this->intel['DBTitle'] = $dbFileData['Title'];
312 312
             $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename'] ?? 'none';
313
-            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none';;
313
+            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none'; ;
314 314
             $this->intel['ErrorInFilename'] = $this->intel['Path'] !== $this->intel['DBPath'];
315 315
             $ss3FileName = $dbFileData['Filename'] ?? '';
316 316
             if ('assets/' === substr((string) $ss3FileName, 0, strlen('assets/'))) {
Please login to merge, or discard this patch.
src/Api/AddAndRemoveFromDb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $absolutePath = $oneFileInfoArray['AbsolutePath'];
28 28
         if ($oneFileInfoArray['IsDir']) {
29 29
             DB::alteration_message('Skipping ' . $pathFromAssetsFolder . ' as this is a folder', '');
30
-        } elseif (! empty($oneFileInfoArray['IsResizedImage'])) {
30
+        } elseif (!empty($oneFileInfoArray['IsResizedImage'])) {
31 31
             if (file_exists($absolutePath)) {
32 32
                 DB::alteration_message('Deleting ' . $pathFromAssetsFolder, 'deleted');
33 33
                 //unlink($localPath);
Please login to merge, or discard this patch.