Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class ScriptNodeBuilder |
||
11 | { |
||
12 | /** |
||
13 | * @return RootEchoNode |
||
14 | */ |
||
15 | 8 | public static function getRootEchoNode(): RootEchoNode |
|
16 | { |
||
17 | 8 | return new RootEchoNode(); |
|
18 | } |
||
19 | |||
20 | /** |
||
21 | * Builds a private Echo channel. |
||
22 | * |
||
23 | * @param string $channelIdentifier The name of the echo event channel. |
||
24 | * |
||
25 | * @return PrivateChannelNode |
||
26 | */ |
||
27 | 3 | public static function getPrivateChannelNode(string $channelIdentifier): PrivateChannelNode |
|
28 | { |
||
29 | 3 | return new PrivateChannelNode($channelIdentifier); |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Builds a private Echo channel. |
||
34 | * |
||
35 | * @param string $eventName The name of the echo event. |
||
36 | * |
||
37 | * @param string $callback A javascript event callback used as the listener. |
||
38 | * |
||
39 | * @return ListenNode |
||
40 | */ |
||
41 | 2 | public static function getListenNode(string $eventName, string $callback): ListenNode |
|
44 | } |
||
45 | |||
46 | 3 | public static function getChannelContextNode(string $getChannelJsVarKey, array $channelContext) |
|
49 | } |
||
50 | } |
||
51 |