@@ -860,8 +860,7 @@ |
||
860 | 860 | try |
861 | 861 | { |
862 | 862 | $content = $this->getContent(); |
863 | - } |
|
864 | - catch (LogicException $e) |
|
863 | + } catch (LogicException $e) |
|
865 | 864 | { |
866 | 865 | if (PHP_VERSION_ID > 70400) |
867 | 866 | { |
@@ -142,8 +142,7 @@ |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | $Quit = $handlerResponse == MainHandler::QUIT && $this->allowQuit(); |
145 | - } |
|
146 | - finally { |
|
145 | + } finally { |
|
147 | 146 | // Returns the contents of the output buffer |
148 | 147 | $output = $this->system->CleanOutputBuffer(); |
149 | 148 | } |
@@ -333,7 +333,9 @@ |
||
333 | 333 | |
334 | 334 | $vars = $this->collectionVars(); |
335 | 335 | |
336 | - if (empty($vars['message'])) $vars['message'] = __('exception.noMessage'); |
|
336 | + if (empty($vars['message'])) { |
|
337 | + $vars['message'] = __('exception.noMessage'); |
|
338 | + } |
|
337 | 339 | |
338 | 340 | $this->template->setVariables($vars); |
339 | 341 | $this->template->render($templatePath); |
@@ -488,7 +488,9 @@ discard block |
||
488 | 488 | */ |
489 | 489 | public function copyDirectory($directory, $destination, $options = null) |
490 | 490 | { |
491 | - if ( ! $this->isDirectory($directory)) return false; |
|
491 | + if ( ! $this->isDirectory($directory)) { |
|
492 | + return false; |
|
493 | + } |
|
492 | 494 | |
493 | 495 | $options = $options ?: FilesystemIterator::SKIP_DOTS; |
494 | 496 | |
@@ -508,13 +510,17 @@ discard block |
||
508 | 510 | // a directory or a file. When it is actually a directory we will need to call |
509 | 511 | // back into this function recursively to keep copying these nested folders. |
510 | 512 | if ($iterator->isDir()) { |
511 | - if ( ! $this->copyDirectory($iterator->getPathname(), $target, $options)) return false; |
|
513 | + if ( ! $this->copyDirectory($iterator->getPathname(), $target, $options)) { |
|
514 | + return false; |
|
515 | + } |
|
512 | 516 | } |
513 | 517 | // If the current items is just a regular file, we will just copy this to the new |
514 | 518 | // location and keep looping. If for some reason the copy fails we'll bail out |
515 | 519 | // and return false, so the developer is aware that the copy process failed. |
516 | 520 | else { |
517 | - if ( ! $this->copy($iterator->getPathname(), $target)) return false; |
|
521 | + if ( ! $this->copy($iterator->getPathname(), $target)) { |
|
522 | + return false; |
|
523 | + } |
|
518 | 524 | } |
519 | 525 | } |
520 | 526 | |
@@ -532,7 +538,9 @@ discard block |
||
532 | 538 | */ |
533 | 539 | public function deleteDirectory($directory, $keep = false) |
534 | 540 | { |
535 | - if ( ! $this->isDirectory($directory)) return false; |
|
541 | + if ( ! $this->isDirectory($directory)) { |
|
542 | + return false; |
|
543 | + } |
|
536 | 544 | |
537 | 545 | $iterators = new filesystemIterator($directory); |
538 | 546 | |
@@ -551,7 +559,9 @@ discard block |
||
551 | 559 | } |
552 | 560 | } |
553 | 561 | |
554 | - if ( ! $keep) @rmdir($directory); |
|
562 | + if ( ! $keep) { |
|
563 | + @rmdir($directory); |
|
564 | + } |
|
555 | 565 | |
556 | 566 | return true; |
557 | 567 | } |
@@ -580,7 +590,9 @@ discard block |
||
580 | 590 | */ |
581 | 591 | public function moveDirectory($from, $to, $overwrite = false) |
582 | 592 | { |
583 | - if ($overwrite && $this->isDirectory($to) && ! $this->deleteDirectory($to)) return false; |
|
593 | + if ($overwrite && $this->isDirectory($to) && ! $this->deleteDirectory($to)) { |
|
594 | + return false; |
|
595 | + } |
|
584 | 596 | |
585 | 597 | if (false === @rename($from, $to)) { |
586 | 598 | $error = error_get_last(); |