Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
BaseController | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getPermissions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Engelsystem\Controllers; |
6 | |
7 | use Engelsystem\Http\Validation\ValidatesRequest; |
8 | |
9 | abstract class BaseController |
10 | { |
11 | use ValidatesRequest; |
12 | |
13 | /** @var string[]|string[][] A list of Permissions required to access the controller or certain pages */ |
14 | protected array $permissions = []; |
15 | |
16 | /** |
17 | * Returns the list of permissions |
18 | * |
19 | * @return string[]|string[][] |
20 | */ |
21 | public function getPermissions(): array |
22 | { |
23 | return $this->permissions; |
24 | } |
25 | } |