| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 7 | private function assertInstanceOf($expectedClass, $entry) |
|
| 41 | { |
||
| 42 | 7 | if ($entry instanceof $expectedClass) { |
|
| 43 | 5 | return; |
|
| 44 | } |
||
| 45 | 2 | $type = is_object($entry) ? get_class($entry) : gettype($entry); |
|
| 46 | 2 | throw new UnresolvedException("Expected container returns an instance of {$expectedClass}, {$type} given."); |
|
| 47 | } |
||
| 48 | } |
||
| 49 |