| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public static function fromAttemptedCall($object, string $method) : self |
||
| 24 | { |
||
| 25 | if (! is_object($object)) { |
||
| 26 | throw TypeError::fromNonObject($object); |
||
| 27 | } |
||
| 28 | |||
| 29 | $className = get_class($object); |
||
| 30 | |||
| 31 | return new self(sprintf( |
||
| 32 | self::ERROR_TEMPLATE, |
||
| 33 | $className, |
||
| 34 | spl_object_hash($object), |
||
| 35 | $method |
||
| 36 | )); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |