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