Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f6d40ac

Browse files
committed
Move @todo comments to separate lines
- Makes them easier to find, and prevents long lines
1 parent 1d7dcdb commit f6d40ac

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/View/Console/ExceptionStrategy.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ public function prepareExceptionViewModel(MvcEvent $e)
184184
if (is_callable($this->message)) {
185185
$callback = $this->message;
186186
$message = (string) $callback($exception, $this->displayExceptions);
187-
} elseif ($this->displayExceptions && ($exception instanceof \Exception || $exception instanceof \Throwable)) { // @TODO clean up once PHP 7 requirement is enforced
187+
} elseif ($this->displayExceptions
188+
// @TODO clean up once PHP 7 requirement is enforced
189+
&& ($exception instanceof \Exception || $exception instanceof \Throwable)
190+
) {
188191
$previous = '';
189192
$previousException = $exception->getPrevious();
190193
while ($previousException) {

src/View/Console/RouteNotFoundStrategy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,8 @@ protected function reportNotFoundReason($e)
460460
];
461461
$report = sprintf("\nReason for failure: %s\n", $reasons[$reason]);
462462

463-
while ($exception instanceof \Exception || $exception instanceof \Throwable) { // @TODO clean up once PHP 7 requirement is enforced
463+
// @TODO clean up once PHP 7 requirement is enforced
464+
while ($exception instanceof \Exception || $exception instanceof \Throwable) {
464465
$report .= sprintf("Exception: %s\nTrace:\n%s\n", $exception->getMessage(), $exception->getTraceAsString());
465466
$exception = $exception->getPrevious();
466467
}

src/View/Http/RouteNotFoundStrategy.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ protected function injectException($model, $e)
250250
$model->setVariable('display_exceptions', true);
251251

252252
$exception = $e->getParam('exception', false);
253-
if (!$exception instanceof \Exception && !$exception instanceof \Throwable) { // @TODO clean up once PHP 7 requirement is enforced
253+
254+
// @TODO clean up once PHP 7 requirement is enforced
255+
if (!$exception instanceof \Exception && !$exception instanceof \Throwable) {
254256
return;
255257
}
256258

0 commit comments

Comments
 (0)