| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 5 | public static function create($signal, array $arguments = []): self |
|
| 44 | { |
||
| 45 | 5 | $name = $signal; |
|
| 46 | 5 | $arguments = \array_values($arguments); |
|
| 47 | |||
| 48 | 5 | if (\is_object($signal)) { |
|
| 49 | 1 | $name = \get_class($signal); |
|
| 50 | |||
| 51 | 1 | \array_unshift($arguments, $signal); |
|
| 52 | } |
||
| 53 | |||
| 54 | 5 | return new self($name, ...$arguments); |
|
| 55 | } |
||
| 97 |