| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public static function fromResult(mixed $result, string $expected): self |
||
| 22 | { |
||
| 23 | $msg = sprintf( |
||
| 24 | 'Expected result of type %s, instead received an instance of %s', |
||
| 25 | $expected, |
||
| 26 | (is_object($result)) ? get_class($result) : gettype($result) |
||
| 27 | ); |
||
| 28 | |||
| 29 | return new self($msg, $expected, $result); |
||
| 30 | } |
||
| 61 |