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
2namespace Apie\Fixtures\Enums;
3
4use Apie\Core\Attributes\AllApplies;
5use Apie\Core\Attributes\Equals;
6use Apie\Core\Attributes\Requires;
7use Apie\Core\Attributes\RuntimeCheck;
8
9enum 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}