@@ -28,7 +28,7 @@ |
||
28 | 28 | $injector->define(Handler::class, [ |
29 | 29 | ":origins" => [ |
30 | 30 | "http://" . $configuration['origins']['websocket'], |
31 | - "http://" . $configuration['origins']['server'] , |
|
31 | + "http://" . $configuration['origins']['server'], |
|
32 | 32 | ], |
33 | 33 | ":audiohub" => new GitAmp(new ArtaxClient(), $configuration['github'], new GithubEventType(), new Factory()) |
34 | 34 | ]); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Storage; |
4 | 4 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | public function increment(string $key): Promise { |
29 | - return resolve(function () use ($key) { |
|
29 | + return resolve(function() use ($key) { |
|
30 | 30 | try { |
31 | 31 | return yield $this->redis->incr($key); |
32 | 32 | } catch (RedisException $e) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | public function decrement(string $key): Promise { |
39 | - return resolve(function () use ($key) { |
|
39 | + return resolve(function() use ($key) { |
|
40 | 40 | try { |
41 | 41 | return yield $this->redis->eval(self::SCRIPT_DECREMENT, [$key], []); |
42 | 42 | } catch (RedisException $e) { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | public function get(string $key): Promise { |
49 | - return resolve(function () use ($key) { |
|
49 | + return resolve(function() use ($key) { |
|
50 | 50 | try { |
51 | 51 | $result = yield $this->redis->get($key); |
52 | 52 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Websocket; |
4 | 4 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $this->connections = []; |
35 | 35 | $this->ips = []; |
36 | 36 | |
37 | - repeat(function () { |
|
37 | + repeat(function() { |
|
38 | 38 | $this->emit(yield $this->gitamp->listen()); |
39 | 39 | }, 25000); |
40 | 40 | } |
@@ -69,7 +69,9 @@ |
||
69 | 69 | * @param Results $events |
70 | 70 | */ |
71 | 71 | public function emit(Results $events) { |
72 | - if (!$events->hasEvents()) return; |
|
72 | + if (!$events->hasEvents()) { |
|
73 | + return; |
|
74 | + } |
|
73 | 75 | |
74 | 76 | $this->endpoint->send(null, $events->jsonEncode()); |
75 | 77 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Github; |
4 | 4 | |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | public function __construct(string $token) |
10 | 10 | { |
11 | - $this->token= $token; |
|
11 | + $this->token = $token; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function getAuthenticationString(): string |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Client; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Client; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Client; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Client; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ekinhbayar\GitAmp\Client; |
4 | 4 |