codeguy/Slim — pull request #864 by eridal (2014-07-22 23:59:24+00:00)
Title: Explicit flow control for better static analysis

## Why?
The motivation for this is to explicitly tell static analysis tools that `App::stop` (and friends) won't return flow control.

## What changed?
*No code change was required*. Only signature (aka docblocks) changes were added. All we need is those functions to explicit declare that they `@return \Exception`
> to be fair a `throw` was required to satisfy `App::halt`'s signature
> although it's guaranteed it will not be used as `App::stop` won't return flow control

## What's the benefit of this?
```php
$app->get('/some/route', function () use ($app) {
if (someCondition()) {
throw $app->halt(404); // <-- explicit flow control
}
$app->render('some/page');
});
```

Although it's completely possible to write client code like the example shown here, static analysis tools will complain about `App::halt` not returning `Exception`.