Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public static function dispatch(string $event, ?string $payload = null): int |
||
16 | { |
||
17 | $command = Hermes::BINARY . " dispatch $event"; |
||
18 | if (!empty($payload)) { |
||
19 | $command .= " $payload"; |
||
20 | } |
||
21 | |||
22 | $process = new Process($command); |
||
23 | $process->enableOutput(); |
||
24 | $process->setTty(true); |
||
25 | |||
26 | return $process->run(); |
||
27 | } |
||
48 |