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

Commit

Permalink
Move @todo comments to separate lines
Browse files Browse the repository at this point in the history
- Makes them easier to find, and prevents long lines
  • Loading branch information
weierophinney committed May 31, 2016
1 parent 1d7dcdb commit f6d40ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/View/Console/ExceptionStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ public function prepareExceptionViewModel(MvcEvent $e)
if (is_callable($this->message)) {
$callback = $this->message;
$message = (string) $callback($exception, $this->displayExceptions);
} elseif ($this->displayExceptions && ($exception instanceof \Exception || $exception instanceof \Throwable)) { // @TODO clean up once PHP 7 requirement is enforced
} elseif ($this->displayExceptions
// @TODO clean up once PHP 7 requirement is enforced
&& ($exception instanceof \Exception || $exception instanceof \Throwable)
) {
$previous = '';
$previousException = $exception->getPrevious();
while ($previousException) {
Expand Down
3 changes: 2 additions & 1 deletion src/View/Console/RouteNotFoundStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ protected function reportNotFoundReason($e)
];
$report = sprintf("\nReason for failure: %s\n", $reasons[$reason]);

while ($exception instanceof \Exception || $exception instanceof \Throwable) { // @TODO clean up once PHP 7 requirement is enforced
// @TODO clean up once PHP 7 requirement is enforced
while ($exception instanceof \Exception || $exception instanceof \Throwable) {
$report .= sprintf("Exception: %s\nTrace:\n%s\n", $exception->getMessage(), $exception->getTraceAsString());
$exception = $exception->getPrevious();
}
Expand Down
4 changes: 3 additions & 1 deletion src/View/Http/RouteNotFoundStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ protected function injectException($model, $e)
$model->setVariable('display_exceptions', true);

$exception = $e->getParam('exception', false);
if (!$exception instanceof \Exception && !$exception instanceof \Throwable) { // @TODO clean up once PHP 7 requirement is enforced

// @TODO clean up once PHP 7 requirement is enforced
if (!$exception instanceof \Exception && !$exception instanceof \Throwable) {
return;
}

Expand Down

0 comments on commit f6d40ac

Please sign in to comment.