@@ -355,7 +355,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -219,7 +219,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -105,7 +105,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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/'))) { |