@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function once($event, callable $listener) |
64 | 64 | { |
65 | - $onceListener = function () use (&$onceListener, $event, $listener) { |
|
65 | + $onceListener = function() use (&$onceListener, $event, $listener) { |
|
66 | 66 | $this->removeListener($event, $onceListener); |
67 | 67 | |
68 | 68 | call_user_func_array($listener, func_get_args()); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | parent::offsetSet($offset, $value); |
49 | 49 | |
50 | 50 | // Remove playbacks when they are done playing |
51 | - $value->oncePlaybackFinished(function (PlaybackFinished $playbackFinished) use ($value) { |
|
51 | + $value->oncePlaybackFinished(function(PlaybackFinished $playbackFinished) use ($value) { |
|
52 | 52 | if ($playbackFinished->getPlayback()->getId() === $value->getId()) { |
53 | 53 | $key = array_search($value, $this->getArrayCopy()); |
54 | 54 | if ($key !== false) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | // Remove playbacks when they are done playing |
72 | 72 | $this->phparia->getWsClient()->once('PlaybackFinished', |
73 | - function (PlaybackFinished $playbackFinished) use ($value) { |
|
73 | + function(PlaybackFinished $playbackFinished) use ($value) { |
|
74 | 74 | if ($playbackFinished->getPlayback()->getId() === $value->getId()) { |
75 | 75 | $key = array_search($value, $this->getArrayCopy()); |
76 | 76 | if ($key !== false) { |
@@ -76,17 +76,17 @@ |
||
76 | 76 | $factory = new Factory($this->eventLoop); |
77 | 77 | |
78 | 78 | return $factory->createClient($address) |
79 | - ->then(function (Client $client) { |
|
79 | + ->then(function(Client $client) { |
|
80 | 80 | $this->amiClient = $client; |
81 | 81 | $this->actionSender = new ActionSender($client); |
82 | 82 | $this->actionSender->events(true); |
83 | - $client->on('close', function () { |
|
83 | + $client->on('close', function() { |
|
84 | 84 | $this->logger->debug('AMI connection closed'); |
85 | 85 | }); |
86 | - $client->on('event', function (Event $event) { |
|
86 | + $client->on('event', function(Event $event) { |
|
87 | 87 | $this->wsClient->emit($event->getName(), (array)$event); |
88 | 88 | }); |
89 | - }, function (\Exception $e) { |
|
89 | + }, function(\Exception $e) { |
|
90 | 90 | $this->logger->err('Connection error: '.$e->getMessage()); |
91 | 91 | }); |
92 | 92 | } |
@@ -153,7 +153,7 @@ |
||
153 | 153 | |
154 | 154 | $this->wsClient = new WebSocket($address, $this->eventLoop, $this->logger); |
155 | 155 | |
156 | - $this->wsClient->on("message", function (WebSocketMessage $rawMessage) { |
|
156 | + $this->wsClient->on("message", function(WebSocketMessage $rawMessage) { |
|
157 | 157 | $message = new Message($rawMessage->getData()); |
158 | 158 | |
159 | 159 | $eventType = '\\phparia\\Events\\'.$message->getType(); |
@@ -453,7 +453,7 @@ |
||
453 | 453 | * @param string $channelId |
454 | 454 | * @param string $variable |
455 | 455 | * @param null|string $default The value to return if the variable does not exist |
456 | - * @return string|Variable |
|
456 | + * @return Variable |
|
457 | 457 | * @throws ConflictException |
458 | 458 | * @throws InvalidParameterException |
459 | 459 | * @throws NotFoundException |