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