Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
41 | 4 | public function __construct(string $name, ?object $subject = null, $payload = null) |
|
42 | { |
||
43 | 4 | if (strpos($name, '*') !== false) { |
|
44 | 1 | throw new \InvalidArgumentException("Invalid event name '$name': illegal character '*'"); |
|
45 | } |
||
46 | |||
47 | 3 | $this->name = $name; |
|
48 | 3 | $this->subject = $subject; |
|
49 | 3 | $this->payload = $payload; |
|
50 | 3 | } |
|
112 |