| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function create(Serialized $serialized): Exception |
||
| 23 | { |
||
| 24 | $className = $serialized->getClassName(); |
||
| 25 | |||
| 26 | $exception = new $className($serialized->getMessage(), $serialized->getCode()); |
||
| 27 | |||
| 28 | $traceProperty = (new ReflectionClass($exception))->getProperty('trace'); |
||
| 29 | |||
| 30 | $traceProperty->setAccessible(true); |
||
| 31 | |||
| 32 | $traceProperty->setValue($exception, $serialized->getTrace()); |
||
| 33 | |||
| 34 | return $exception; |
||
| 35 | } |
||
| 37 |