Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 88 | public function __construct(string $enum) |
|
25 | { |
||
26 | 88 | if (! class_exists($enum) || ! isset(class_implements($enum)[Enumerable::class])) { |
|
27 | 8 | throw new InvalidArgumentException("The given class {$enum} does not implement the Enumerable interface."); |
|
28 | } |
||
29 | |||
30 | 80 | $this->enum = $enum; |
|
|
|||
31 | 80 | } |
|
32 | |||
62 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..