Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
35 | public function validate(ValidationContext $context) |
||
36 | { |
||
37 | if (empty($this->value)) { |
||
38 | throw $this->createValidationException( |
||
39 | $context, |
||
40 | 'The type alias must not have an empty value.' |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | if (! \is_string($this->value)) { |
||
|
|||
45 | throw $this->createValidationException( |
||
46 | $context, |
||
47 | 'The type alias must be a string' |
||
48 | ); |
||
52 |