Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 10 |
Ratio | 100 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | public function __invoke($request, $response, $next) |
||
10 | { |
||
11 | if (!$this->container->auth->check()) { |
||
12 | $this->container->flash->addMessage('danger', 'Zaloguj się aby dostać się do tej podstrony'); |
||
13 | return $response->withRedirect($this->container->router->pathFor('auth.signin')); |
||
14 | } |
||
15 | |||
16 | $response = $next($request, $response); |
||
17 | return $response; |
||
18 | } |
||
19 | } |
||
20 |