Passed
Push — master ( 5e2021...3d7c5f )
by Nicolaas
02:55
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   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     protected function init()
356 356
     {
357 357
         parent::init();
358
-        if (! Permission::check('ADMIN')) {
358
+        if (!Permission::check('ADMIN')) {
359 359
             return Security::permissionFailure($this);
360 360
         }
361 361
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
         $extensions = $this->request->getVar('extensions');
402 402
         if ($extensions) {
403
-            if (! is_array($extensions)) {
403
+            if (!is_array($extensions)) {
404 404
                 $extensions = [$extensions];
405 405
             }
406 406
 
@@ -548,11 +548,11 @@  discard block
 block discarded – undo
548 548
         $step = 100;
549 549
         $array = [];
550 550
         $i = 0;
551
-        $totalRaw = (int)  $this->getAllFilesInfoProvider()->getTotalFileCountRaw();
552
-        $totalFiltered = (int)  $this->getAllFilesInfoProvider()->getTotalFileCountFiltered();
551
+        $totalRaw = (int) $this->getAllFilesInfoProvider()->getTotalFileCountRaw();
552
+        $totalFiltered = (int) $this->getAllFilesInfoProvider()->getTotalFileCountFiltered();
553 553
         if ($totalRaw > $step) {
554 554
             for ($i = $step; ($i - $step) < $totalFiltered; $i += $step) {
555
-                if ($i > $this->limit && ! isset($array[$this->limit])) {
555
+                if ($i > $this->limit && !isset($array[$this->limit])) {
556 556
                     $array[$this->limit] = $this->limit;
557 557
                 }
558 558
 
Please login to merge, or discard this patch.
src/Files/AllFilesInfo.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function getStagingData(string $pathFromAssets, ?int $id = 0): array
221 221
     {
222
-        if (! $id) {
222
+        if (!$id) {
223 223
             $id = $this->databaseLookupListStaging[$pathFromAssets] ?? 0;
224 224
         }
225 225
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function getLiveData(string $pathFromAssets, ?int $id = 0): array
235 235
     {
236
-        if (! $id) {
236
+        if (!$id) {
237 237
             $id = $this->databaseLookupListLive[$pathFromAssets] ?? 0;
238 238
         }
239 239
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
     protected function registerFile($path, ?bool $inFileSystem = true)
528 528
     {
529 529
         if ($path) {
530
-            if (! isset($this->listOfFiles[$path])) {
530
+            if (!isset($this->listOfFiles[$path])) {
531 531
                 $this->listOfFiles[$path] = $inFileSystem;
532 532
                 if ($this->verbose) {
533 533
                     if ($inFileSystem) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 
572 572
         $fileName = basename($absolutePath);
573 573
         $isErrorPage = ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
574
-        return ! $isErrorPage;
574
+        return !$isErrorPage;
575 575
     }
576 576
 
577 577
     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
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function toArray(): array
106 106
     {
107 107
         $cachekey = $this->getCacheKey();
108
-        if (! $this->hasCacheKey($cachekey) || $this->noCache) {
108
+        if (!$this->hasCacheKey($cachekey) || $this->noCache) {
109 109
             $this->collateIntel();
110 110
             if ($this->debug) {
111 111
                 if ($this->intel['ErrorHasAnyError']) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     protected function addFolderDetails($dbFileData)
263 263
     {
264 264
         $folder = [];
265
-        if (! empty($dbFileData['ParentID'])) {
265
+        if (!empty($dbFileData['ParentID'])) {
266 266
             if (isset($this->folderCache[$dbFileData['ParentID']])) {
267 267
                 $folder = $this->folderCache[$dbFileData['ParentID']];
268 268
             } else {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         }
276 276
 
277 277
         if (empty($folder)) {
278
-            $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']);
278
+            $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']);
279 279
             $this->intel['FolderID'] = 0;
280 280
         } else {
281 281
             $this->intel['ErrorFindingFolder'] = false;
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
             $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']);
321 321
             $existsOnStaging = $obj->existsOnStaging($this->intel['DBID']);
322 322
             $existsOnLive = $obj->existsOnLive($this->intel['DBID']);
323
-            $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging;
324
-            $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive;
325
-            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive;
326
-            $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive;
323
+            $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging;
324
+            $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive;
325
+            $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive;
326
+            $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive;
327 327
             $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit';
328 328
             $this->intel['DBTitle'] = $dbFileData['Title'];
329 329
             $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename'] ?? 'none';
330
-            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none';;
330
+            $this->intel['DBFilenameSS3'] = $dbFileData['Filename'] ?? 'none'; ;
331 331
             $this->intel['ErrorInFilename'] = $this->intel['Path'] !== $this->intel['DBPath'];
332 332
             $ss3FileName = $dbFileData['Filename'] ?? '';
333 333
             if ('assets/' === substr((string) $ss3FileName, 0, strlen('assets/'))) {
Please login to merge, or discard this patch.