Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public static function new($value, string $format, string $error) : self |
||
19 | { |
||
20 | $actualType = is_object($value) ? get_class($value) : gettype($value); |
||
21 | |||
22 | return new self( |
||
23 | sprintf( |
||
24 | 'Could not convert PHP type "%s" to "%s". An error was triggered by the serialization: %s', |
||
25 | $actualType, |
||
26 | $format, |
||
27 | $error |
||
28 | ) |
||
32 |