Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | namespace Apie\Fixtures\Enums; |
3 | |
4 | use Apie\Core\Attributes\AllApplies; |
5 | use Apie\Core\Attributes\Equals; |
6 | use Apie\Core\Attributes\Requires; |
7 | use Apie\Core\Attributes\RuntimeCheck; |
8 | |
9 | enum RestrictedEnum: string |
10 | { |
11 | #[RuntimeCheck(new Equals('locale', 'nl'))] |
12 | case RED = 'red'; |
13 | #[RuntimeCheck(new Requires('authenticated'))] |
14 | case GREEN = 'green'; |
15 | #[RuntimeCheck(new AllApplies(new Requires('authenticated'), new Equals('locale', 'nl')))] |
16 | case BLUE = 'blue'; |
17 | #[RuntimeCheck(new Requires('authenticated'))] |
18 | #[RuntimeCheck(new Equals('locale', 'nl'))] |
19 | case ORANGE = 'orange'; |
20 | } |