Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Role | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| getRoles | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Security; |
| 4 | |
| 5 | use ReflectionClass; |
| 6 | |
| 7 | /** |
| 8 | * Gina role definition for application. |
| 9 | */ |
| 10 | class Role |
| 11 | { |
| 12 | public const ADMINISTRATEUR = 'ROLE_ADMIN'; |
| 13 | public const SITE_ADMIN = 'ROLE_SITE_ADMIN'; |
| 14 | public const UTILISATEUR = 'ROLE_UTILISATEUR'; |
| 15 | |
| 16 | public const ALL = 'ROLE_USER'; // all user of frontend, backend and anonymous have this role |
| 17 | |
| 18 | /** |
| 19 | * @return array<string,mixed> |
| 20 | */ |
| 21 | public static function getRoles(): array |
| 22 | { |
| 23 | return (new ReflectionClass(__CLASS__))->getConstants(); |
| 24 | } |
| 25 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 23 | return (new ReflectionClass(__CLASS__))->getConstants(); |
| 24 | } |