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