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