Passed
Push — master ( 9097b3...c384c0 )
by Nicolaas
02:31
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/Control/View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     protected function init()
449 449
     {
450 450
         parent::init();
451
-        if (! Permission::check('ADMIN')) {
451
+        if (!Permission::check('ADMIN')) {
452 452
             return Security::permissionFailure($this);
453 453
         }
454 454
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 
493 493
         $extensions = $this->request->getVar('extensions');
494 494
         if ($extensions) {
495
-            if (! is_array($extensions)) {
495
+            if (!is_array($extensions)) {
496 496
                 $extensions = [$extensions];
497 497
             }
498 498
 
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
         $i = 0;
765 765
         if ($this->totalFileCountRaw > $step) {
766 766
             for ($i = $step; ($i - $step) < $this->totalFileCountFiltered; $i += $step) {
767
-                if ($i > $this->limit && ! isset($array[$this->limit])) {
767
+                if ($i > $this->limit && !isset($array[$this->limit])) {
768 768
                     $array[$this->limit] = $this->limit;
769 769
                 }
770 770
 
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/Files/AllFilesInfo.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public static function getStagingData(string $pathFromAssets, ?int $id = 0): array
125 125
     {
126
-        if (! $id) {
126
+        if (!$id) {
127 127
             $id = self::$databaseLookupListStaging[$pathFromAssets] ?? 0;
128 128
         }
129 129
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public static function getLiveData(string $pathFromAssets, ?int $id = 0): array
139 139
     {
140
-        if (! $id) {
140
+        if (!$id) {
141 141
             $id = self::$databaseLookupListLive[$pathFromAssets] ?? 0;
142 142
         }
143 143
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     {
184 184
         if ([] === self::$listOfFiles) {
185 185
             $cachekey = $this->getCacheKey();
186
-            if (! $this->hasCacheKey($cachekey)) {
186
+            if (!$this->hasCacheKey($cachekey)) {
187 187
                 $this->flushNow('<h1>Analysing files</h1>');
188 188
                 //disk
189 189
                 $diskArray = $this->getArrayOfFilesOnDisk();
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     protected function registerFile($path, $inFileSystem)
222 222
     {
223 223
         if ($path) {
224
-            if (! isset(self::$listOfFiles[$path])) {
224
+            if (!isset(self::$listOfFiles[$path])) {
225 225
                 self::$listOfFiles[$path] = $inFileSystem;
226 226
                 if ($inFileSystem) {
227 227
                     $this->flushNow('. ', '', false);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     protected static function findIdFromFileName(array $data, string $filename): int
239 239
     {
240 240
         $id = self::findInData($data, 'FileFilename', $filename);
241
-        if (! $id) {
241
+        if (!$id) {
242 242
             $id = self::findInData($data, 'Filename', $filename);
243 243
         }
244 244
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         $fileName = basename($path);
274 274
 
275
-        return ! ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
275
+        return !('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5));
276 276
     }
277 277
 
278 278
     protected function getArrayOfFilesOnDisk(): array
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/AddAndRemoveFromDb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $localPath = $oneFileInfoArray['Path'];
25 25
         if ($oneFileInfoArray['IsDir']) {
26 26
             DB::alteration_message('Skipping ' . $pathFromAssetsFolder . ' as this is a folder', '');
27
-        } elseif (! empty($oneFileInfoArray['IsResizedImage'])) {
27
+        } elseif (!empty($oneFileInfoArray['IsResizedImage'])) {
28 28
             if (file_exists($localPath)) {
29 29
                 DB::alteration_message('Deleting ' . $pathFromAssetsFolder, 'deleted');
30 30
                 //unlink($localPath);
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
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
                 $fieldLabels = $obj->fieldLabels(true);
23 23
                 foreach ($types as $type) {
24 24
                     $rels = Config::inst()->get($className, $type, Config::UNINHERITED);
25
-                    if (is_array($rels) && ! empty($rels)) {
25
+                    if (is_array($rels) && !empty($rels)) {
26 26
                         foreach ($rels as $relName => $relType) {
27 27
                             if (Image::class === $relType) {
28 28
                                 $title = $obj->i18n_singular_name() . ' - ' . ($fieldLabels[$relName] ?? $relName);
Please login to merge, or discard this patch.