Total Complexity | 7 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class TypeInstanceOf extends AbstractRule |
||
15 | { |
||
16 | protected const NAME = 'instance_of'; |
||
17 | |||
18 | protected $fillableParams = ['type']; |
||
19 | |||
20 | /** |
||
21 | * Modifie le type de l'enumeration |
||
22 | */ |
||
23 | public function type(string $type): self |
||
24 | { |
||
25 | 2 | $this->params['type'] = $type; |
|
26 | |||
27 | 2 | return $this; |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | public function check($value): bool |
||
46 | } |
||
47 | } |
||
48 |