Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
22 | #[Attribute(Attribute::TARGET_CLASS)] |
||
23 | final class Access extends AbstractAnnotation |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Allowed role. |
||
28 | * |
||
29 | * @var string|null |
||
30 | */ |
||
31 | public ?string $role = null; |
||
32 | |||
33 | /** |
||
34 | * Allowed permissions. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | public array $permissions = []; |
||
39 | |||
40 | /** |
||
41 | * @param array|string|null $role Allowed role or annotation |
||
42 | * parameters. |
||
43 | * @param array $permissions Allowed permissions. |
||
44 | * |
||
45 | * @throws ReflectionException |
||
46 | */ |
||
47 | public function __construct( |
||
61 |