@@ -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 | ); |
@@ -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); |
@@ -77,7 +77,7 @@ discard block |
||
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 | $this->flushNow('x ', '', false); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | protected function addFolderDetails($dbFileData) |
232 | 232 | { |
233 | 233 | $folder = []; |
234 | - if (! empty($dbFileData['ParentID'])) { |
|
234 | + if (!empty($dbFileData['ParentID'])) { |
|
235 | 235 | if (isset($this->folderCache[$dbFileData['ParentID']])) { |
236 | 236 | $folder = $this->folderCache[$dbFileData['ParentID']]; |
237 | 237 | } else { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | if (empty($folder)) { |
247 | - $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']); |
|
247 | + $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']); |
|
248 | 248 | $this->intel['FolderID'] = 0; |
249 | 249 | } else { |
250 | 250 | $this->intel['ErrorFindingFolder'] = false; |
@@ -285,10 +285,10 @@ discard block |
||
285 | 285 | $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']); |
286 | 286 | $existsOnStaging = AllFilesInfo::existsOnStaging($this->intel['DBID']); |
287 | 287 | $existsOnLive = AllFilesInfo::existsOnLive($this->intel['DBID']); |
288 | - $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging; |
|
289 | - $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive; |
|
290 | - $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive; |
|
291 | - $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive; |
|
288 | + $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging; |
|
289 | + $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive; |
|
290 | + $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive; |
|
291 | + $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive; |
|
292 | 292 | $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit'; |
293 | 293 | $this->intel['DBTitle'] = $dbFileData['Title']; |
294 | 294 | $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename']; |