| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | trait ProtectedController |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var bool Contain login status |
||
| 21 | */ |
||
| 22 | private $authentication = false; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Allow access to controller only if logged. |
||
| 26 | * |
||
| 27 | * @param Authentication $authentication |
||
| 28 | * @param string $redirect |
||
| 29 | */ |
||
| 30 | 1 | private function protect(Authentication $authentication, string $redirect): void |
|
| 38 |