| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 9 | protected static function ThrowIfNotType( |
|
| 17 | $object, |
||
| 18 | string $type, |
||
| 19 | int $argument, |
||
| 20 | string $function |
||
| 21 | ) { |
||
| 22 | 9 | if (false === is_a($object, $type, is_string($object))) { |
|
| 23 | 6 | throw new DaftObjectRepositoryTypeByClassMethodAndTypeException( |
|
| 24 | 6 | $argument, |
|
| 25 | 6 | static::class, |
|
| 26 | 6 | $function, |
|
| 27 | 6 | $type, |
|
| 28 | 6 | is_string($object) ? $object : get_class($object) |
|
| 29 | ); |
||
| 33 |