@@ -77,7 +77,7 @@ |
||
77 | 77 | */ |
78 | 78 | private function formatResponse(string $data): array |
79 | 79 | { |
80 | - return array_reduce(explode("\n", trim($data)), function ($carry, $item) { |
|
80 | + return array_reduce(explode("\n", trim($data)), function($carry, $item) { |
|
81 | 81 | $res = explode(':', $item, 2); |
82 | 82 | $carry[trim(reset($res))] = end($res); |
83 | 83 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | private function send(array $data) |
123 | 123 | { |
124 | - $data = json_encode($data) . "\r\n"; |
|
124 | + $data = json_encode($data)."\r\n"; |
|
125 | 125 | $this->socket->send($data, self::NO_FLAG); |
126 | 126 | } |
127 | 127 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | private function read(): Promise |
132 | 132 | { |
133 | - return new Promise(function (callable $resolve, callable $reject) { |
|
133 | + return new Promise(function(callable $resolve, callable $reject) { |
|
134 | 134 | $response = new Response( |
135 | 135 | json_decode($this->socket->read(self::PACKET_LENGTH), true) |
136 | 136 | ); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | public function startCf(int $count, int $action, array $flowExpression) |
331 | 331 | { |
332 | - $state = implode(",", array_map(function ($item) { |
|
332 | + $state = implode(",", array_map(function($item) { |
|
333 | 333 | return implode(",", $item); |
334 | 334 | }, $flowExpression)); |
335 | 335 | $data = [ |
@@ -13,7 +13,7 @@ |
||
13 | 13 | const COLOR_MODE = 'color_mode'; |
14 | 14 | const FLOWING = 'flowing'; |
15 | 15 | const DELAY_OFF = 'delayoff'; |
16 | - const FLOW_PARAMS= 'flow_params'; |
|
16 | + const FLOW_PARAMS = 'flow_params'; |
|
17 | 17 | const MUSIC_ON = 'music_on'; |
18 | 18 | const NAME = 'name'; |
19 | 19 | } |