Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public static function forEventClass( |
||
27 | string $eventClassName, |
||
28 | Trackable $trackable, |
||
29 | Throwable $previous = null |
||
30 | ): self { |
||
31 | $message = sprintf( |
||
32 | 'Failed to create and inflate event: `%s`, with trackable: `%s`.', |
||
33 | $eventClassName, |
||
34 | $trackable->getIdentifier() |
||
35 | ); |
||
36 | |||
37 | $instance = new self($message, static::CODE, $previous); |
||
38 | $instance->eventClassName = $eventClassName; |
||
39 | |||
40 | return $instance; |
||
41 | } |
||
43 |