Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class ListenNode extends ScriptNode |
||
6 | { |
||
7 | /** |
||
8 | * @var string The name of the Echo event to listen to. |
||
9 | */ |
||
10 | private string $eventName; |
||
11 | |||
12 | /** |
||
13 | * @var string The Javascript callback used as the event listener. |
||
14 | */ |
||
15 | private string $listenerCallback; |
||
16 | |||
17 | /** |
||
18 | * ListenNode constructor. |
||
19 | * |
||
20 | * @param string $eventName The name of the echo event. |
||
21 | * @param string $callback A javascript event callback used as the listener. |
||
22 | */ |
||
23 | 2 | public function __construct(string $eventName, string $callback) |
|
27 | 2 | } |
|
28 | |||
29 | 1 | public function __toString() |
|
34 |