| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function __invoke($request,$response,$next) |
||
| 12 | { |
||
| 13 | if(!$this->container->auth->check()) { |
||
| 14 | $this->container->flash->addMessage('error','Please sign in before doing that'); |
||
| 15 | return $response->withRedirect($this->container->router->pathFor('auth.signin')); |
||
| 16 | } |
||
| 17 | |||
| 18 | $response = $next($request,$response); |
||
| 19 | return $response; |
||
| 20 | |||
| 21 | } |
||
| 22 | } |