Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 8 | public function __construct(string $parameter, string $class, mixed $argument) |
|
14 | { |
||
15 | 8 | $type = \is_object($argument) |
|
16 | 3 | ? 'Instance of ' . \get_class($argument) |
|
17 | 5 | : \ucfirst(\get_debug_type($argument)); |
|
18 | 8 | parent::__construct(\sprintf( |
|
19 | 8 | '%s should be instance of %s or its declaration. %s was received instead.', |
|
20 | 8 | $parameter, |
|
21 | 8 | $class, |
|
22 | 8 | $type |
|
23 | 8 | )); |
|
26 |