Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | 5 | public function __construct($value) |
|
18 | { |
||
19 | 5 | if (false == \is_resource($value)) { |
|
|
|||
20 | 1 | throw new \TypeError( |
|
21 | 'Argument 1 passed to drupol\valuewrapper\Resource\ResourceValue::__construct()' . |
||
22 | 1 | 'must be of the type Resource, ' . gettype($value) . ' given.' |
|
23 | ); |
||
24 | } |
||
25 | |||
26 | 4 | parent::__construct($value); |
|
27 | 4 | } |
|
28 | |||
42 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.