Passed
Push — master ( 1b8bca...b0afa4 )
by Nicolaas
02:39
created
src/Files/AllFilesInfo.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public static function getStagingData(string $pathFromAssets, ?int $id = 0): array
126 126
     {
127
-        if (! $id) {
127
+        if (!$id) {
128 128
             $id = self::$databaseLookupListStaging[$pathFromAssets] ?? 0;
129 129
         }
130 130
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public static function getLiveData(string $pathFromAssets, ?int $id = 0): array
140 140
     {
141
-        if (! $id) {
141
+        if (!$id) {
142 142
             $id = self::$databaseLookupListLive[$pathFromAssets] ?? 0;
143 143
         }
144 144
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     protected function registerFile($path, ?bool $inFileSystem = true)
223 223
     {
224 224
         if ($path) {
225
-            if (! isset(self::$listOfFiles[$path])) {
225
+            if (!isset(self::$listOfFiles[$path])) {
226 226
                 self::$listOfFiles[$path] = $inFileSystem;
227 227
                 if ($inFileSystem) {
228 228
                     echo '✓ ';
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     protected static function findIdFromFileName(array $data, string $filename): int
240 240
     {
241 241
         $id = self::findInData($data, 'FileFilename', $filename);
242
-        if (! $id) {
242
+        if (!$id) {
243 243
             $id = self::findInData($data, 'Filename', $filename);
244 244
         }
245 245
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 
274 274
         $fileName = basename($path);
275 275
 
276
-        return ! ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
276
+        return !('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
277 277
     }
278 278
 
279 279
     protected function getArrayOfFilesOnDisk(): array
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
             $files = File::get()->filter(['ClassName:not' => Folder::class]);
309 309
             foreach ($files as $file) {
310 310
                 $row = $file->toMap();
311
-                $absoluteLocation =  $this->path . DIRECTORY_SEPARATOR .  $file->getFilename();
311
+                $absoluteLocation = $this->path . DIRECTORY_SEPARATOR . $file->getFilename();
312 312
                 if ('Stage' === $stage) {
313 313
                     self::$dataStaging[$row['ID']] = $row;
314 314
                     self::$databaseLookupListStaging[$absoluteLocation] = $row['ID'];
Please login to merge, or discard this patch.
src/Files/OneFileInfo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function toArray(): array
78 78
     {
79 79
         $cachekey = $this->getCacheKey();
80
-        if (! $this->hasCacheKey($cachekey)) {
80
+        if (!$this->hasCacheKey($cachekey)) {
81 81
             $this->getUncachedIntel();
82 82
             if ($this->intel['ErrorHasAnyError']) {
83 83
                 echo 'x ';
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     protected function addFolderDetails($dbFileData)
231 231
     {
232 232
         $folder = [];
233
-        if (! empty($dbFileData['ParentID'])) {
233
+        if (!empty($dbFileData['ParentID'])) {
234 234
             if (isset($this->folderCache[$dbFileData['ParentID']])) {
235 235
                 $folder = $this->folderCache[$dbFileData['ParentID']];
236 236
             } else {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         }
244 244
 
245 245
         if (empty($folder)) {
246
-            $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']);
246
+            $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']);
247 247
             $this->intel['FolderID'] = 0;
248 248
         } else {
249 249
             $this->intel['ErrorFindingFolder'] = false;
@@ -284,10 +284,10 @@  discard block
 block discarded – undo
284 284
             $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']);
285 285
             $existsOnStaging = AllFilesInfo::existsOnStaging($this->intel['DBID']);
286 286
             $existsOnLive = AllFilesInfo::existsOnLive($this->intel['DBID']);
287
-            $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging;
288
-            $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive;
289
-            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive;
290
-            $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive;
287
+            $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging;
288
+            $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive;
289
+            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive;
290
+            $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive;
291 291
             $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit';
292 292
             $this->intel['DBTitle'] = $dbFileData['Title'];
293 293
             $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename'];
Please login to merge, or discard this patch.
src/Api/ImageFieldFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                 $fieldLabels = $obj->fieldLabels(true);
24 24
                 foreach ($types as $type) {
25 25
                     $rels = Config::inst()->get($className, $type, Config::UNINHERITED);
26
-                    if (is_array($rels) && ! empty($rels)) {
26
+                    if (is_array($rels) && !empty($rels)) {
27 27
                         foreach ($rels as $relName => $relType) {
28 28
                             if (is_a($relType, File::class, true)) {
29 29
                                 $title = $obj->i18n_singular_name() . ' - ' . ($fieldLabels[$relName] ?? $relName);
Please login to merge, or discard this patch.