Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait InteractsWithEvents |
||
10 | { |
||
11 | /** |
||
12 | * Register listeners for the given event |
||
13 | * |
||
14 | * @param string $event |
||
15 | * @param mixed ...$listeners |
||
16 | * @return static |
||
17 | */ |
||
18 | 4 | public function listensTo(string $event, mixed ...$listeners): static |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * Exclude listeners for the given event |
||
29 | * |
||
30 | * @param string $event |
||
31 | * @param mixed ...$listeners |
||
32 | * @return static |
||
33 | */ |
||
34 | 3 | public function stopsListeningTo(string $event, mixed ...$listeners): static |
|
43 |