Passed
Push — master ( b0afa4...2243e7 )
by Nicolaas
02:46
created
src/Control/Fix.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     protected function init()
68 68
     {
69 69
         parent::init();
70
-        if (! Permission::check('ADMIN')) {
70
+        if (!Permission::check('ADMIN')) {
71 71
             return Security::permissionFailure($this);
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/Reports/ImagesPerFieldReport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                     $list = $list->{$filterMethod}([$field => 0]);
122 122
                 } else {
123 123
                     $list = $list->filterByCallBack(
124
-                        function ($item) use ($fieldUsed, $existsValue) {
124
+                        function($item) use ($fieldUsed, $existsValue) {
125 125
                             return (bool) $item->{$fieldUsed}()->exists() === $existsValue;
126 126
                         }
127 127
                     );
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function sourceQuery($params)
145 145
     {
146
-        if (! $this->hasMethod('sourceRecords')) {
146
+        if (!$this->hasMethod('sourceRecords')) {
147 147
             throw new \RuntimeException(
148 148
                 'Please override sourceQuery()/sourceRecords() and columns() or, if necessary, override getReportField()'
149 149
             );
Please login to merge, or discard this patch.
src/Traits/FilesystemRelatedTraits.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     protected function getBaseFolder(): string
40 40
     {
41
-        if (! $this->baseFolder) {
41
+        if (!$this->baseFolder) {
42 42
             $this->baseFolder = rtrim(Director::baseFolder(), DIRECTORY_SEPARATOR);
43 43
         }
44 44
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected function getPublicBaseFolder(): string
49 49
     {
50
-        if (! $this->publicBaseFolder) {
50
+        if (!$this->publicBaseFolder) {
51 51
             $this->publicBaseFolder = rtrim(Director::publicFolder(), DIRECTORY_SEPARATOR);
52 52
         }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     protected function getAssetsBaseFolder(): string
58 58
     {
59
-        if (! $this->assetsBaseFolder) {
59
+        if (!$this->assetsBaseFolder) {
60 60
             $this->assetsBaseFolder = rtrim(ASSETS_PATH, DIRECTORY_SEPARATOR);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Api/CompareImages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
         $i1 = $this->createImage($a);
11 11
         $i2 = $this->createImage($b);
12 12
 
13
-        if (! $i1 || ! $i2) {
13
+        if (!$i1 || !$i2) {
14 14
             return false;
15 15
         }
16 16
 
Please login to merge, or discard this patch.
src/Api/FilesSimilarToMe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         foreach ($a as $file) {
19 19
             $nameOne = $file->Path;
20 20
             $nameOneFromAssets = $file->PathFromAssetsFolder;
21
-            if (! in_array($nameOne, $alreadyDone, true)) {
21
+            if (!in_array($nameOne, $alreadyDone, true)) {
22 22
                 $easyFind = false;
23 23
                 $sortArray = [];
24 24
                 foreach ($b as $compareImage) {
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.
src/Control/View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     protected function init()
327 327
     {
328 328
         parent::init();
329
-        if (! Permission::check('ADMIN')) {
329
+        if (!Permission::check('ADMIN')) {
330 330
             return Security::permissionFailure($this);
331 331
         }
332 332
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
         $extensions = $this->request->getVar('extensions');
373 373
         if ($extensions) {
374
-            if (! is_array($extensions)) {
374
+            if (!is_array($extensions)) {
375 375
                 $extensions = [$extensions];
376 376
             }
377 377
 
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
         $i = 0;
522 522
         if ($this->getAllFilesInfoProvider()->getTotalFileCountRaw() > $step) {
523 523
             for ($i = $step; ($i - $step) < $this->totalFileCountFiltered; $i += $step) {
524
-                if ($i > $this->limit && ! isset($array[$this->limit])) {
524
+                if ($i > $this->limit && !isset($array[$this->limit])) {
525 525
                     $array[$this->limit] = $this->limit;
526 526
                 }
527 527
 
Please login to merge, or discard this patch.
src/Files/AllFilesInfo.php 1 patch
Spacing   +5 added lines, -5 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
             echo "Searching for " . $pathFromAssets . ' in ' . print_r($this->databaseLookupListStaging, 1);
212 212
             $id = $this->databaseLookupListStaging[$pathFromAssets] ?? 0;
213 213
         }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function getLiveData(string $pathFromAssets, ?int $id = 0): array
224 224
     {
225
-        if (! $id) {
225
+        if (!$id) {
226 226
             $id = $this->databaseLookupListLive[$pathFromAssets] ?? 0;
227 227
         }
228 228
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
     protected function registerFile($path, ?bool $inFileSystem = true)
425 425
     {
426 426
         if ($path) {
427
-            if (! isset($this->listOfFiles[$path])) {
427
+            if (!isset($this->listOfFiles[$path])) {
428 428
                 $this->listOfFiles[$path] = $inFileSystem;
429 429
                 if ($this->debug) {
430 430
                     echo $inFileSystem ? '✓ ' : 'x ';
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     protected function findIdFromFileName(array $data, string $filename): int
440 440
     {
441 441
         $id = self::findInData($data, 'FileFilename', $filename);
442
-        if (! $id) {
442
+        if (!$id) {
443 443
             $id = self::findInData($data, 'Filename', $filename);
444 444
         }
445 445
 
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 
474 474
         $fileName = basename($absolutePath);
475 475
 
476
-        return ! ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
476
+        return !('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
477 477
     }
478 478
 
479 479
     protected function getArrayOfFilesOnDisk(): array
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
@@ -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;
@@ -300,10 +300,10 @@  discard block
 block discarded – undo
300 300
             $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']);
301 301
             $existsOnStaging = $obj->existsOnStaging($this->intel['DBID']);
302 302
             $existsOnLive = $obj->existsOnLive($this->intel['DBID']);
303
-            $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging;
304
-            $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive;
305
-            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive;
306
-            $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive;
303
+            $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging;
304
+            $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive;
305
+            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive;
306
+            $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive;
307 307
             $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit';
308 308
             $this->intel['DBTitle'] = $dbFileData['Title'];
309 309
             $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename'];
Please login to merge, or discard this patch.