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