@@ -67,7 +67,7 @@ |
||
| 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 | |
@@ -448,7 +448,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -121,7 +121,7 @@ discard block |
||
| 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 |
||
| 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 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -38,7 +38,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -24,7 +24,7 @@ |
||
| 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); |
@@ -10,7 +10,7 @@ |
||
| 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 | |
@@ -18,7 +18,7 @@ |
||
| 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) { |
@@ -22,7 +22,7 @@ |
||
| 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); |