Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Role
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getRoles
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Security;
4
5use ReflectionClass;
6
7/**
8 * Gina role definition for application.
9 */
10class 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}