Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 200 | public function __construct(string $key, $value, bool $supportsNullValue = false) |
|
24 | { |
||
25 | 200 | Assert::stringNotEmpty($key); |
|
26 | 200 | Assert::nullOrOneOf(\gettype($value), [ |
|
27 | 200 | 'array', |
|
28 | 'boolean', |
||
29 | 'float', |
||
30 | 'double', |
||
31 | 'real', |
||
32 | 'integer', |
||
33 | 'object', |
||
34 | 'string', |
||
35 | 'NULL', |
||
36 | ]); |
||
37 | |||
38 | 200 | $this->key = $key; |
|
39 | 200 | $this->value = $value; |
|
40 | 200 | $this->supportsNullValue = $supportsNullValue; |
|
41 | 200 | } |
|
58 |