@@ -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 @@ 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 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | public function set(string $key, int $val): Promise { |
61 | - return resolve(function () use ($key, $val) { |
|
61 | + return resolve(function() use ($key, $val) { |
|
62 | 62 | try { |
63 | 63 | return yield $this->redis->set($key, $val); |
64 | 64 | } catch (RedisException $e) { |
@@ -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\Response; |
4 | 4 | |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct(Factory $eventFactory) |
17 | 17 | { |
18 | - $this->eventFactory = $eventFactory; |
|
18 | + $this->eventFactory = $eventFactory; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function appendResponse(Response $response) |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | try { |
37 | 37 | $this->events[] = $this->eventFactory->build($event); |
38 | - } catch(UnknownEventException $e) { |
|
38 | + } catch (UnknownEventException $e) { |
|
39 | 39 | // maybe log unknown events? |
40 | 40 | } |
41 | 41 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | 'certificate' => '/path/to/certificate.pem', |
33 | 33 | 'key' => '/path/to/key.pem', |
34 | 34 | ], |
35 | - */ |
|
35 | + */ |
|
36 | 36 | /** |
37 | 37 | * Either use a token or a username + password login. |
38 | 38 | * Note for 2fa users, you can only use tokens. |
@@ -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 |
@@ -25,12 +25,16 @@ |
||
25 | 25 | if (isset($configuration['ssl'])) { |
26 | 26 | $origin = 'https://' . $configuration['hostname']; |
27 | 27 | |
28 | - if ($configuration['ssl']['port'] !== 443) $origin .= ':' . $configuration['ssl']['port']; |
|
29 | -} else { |
|
28 | + if ($configuration['ssl']['port'] !== 443) { |
|
29 | + $origin .= ':' . $configuration['ssl']['port']; |
|
30 | + } |
|
31 | + } else { |
|
30 | 32 | $origin = 'http://' . $configuration['hostname']; |
31 | 33 | |
32 | - if ($configuration['expose']['port'] !== 80) $origin .= ':' . $configuration['expose']['port']; |
|
33 | -} |
|
34 | + if ($configuration['expose']['port'] !== 80) { |
|
35 | + $origin .= ':' . $configuration['expose']['port']; |
|
36 | + } |
|
37 | + } |
|
34 | 38 | |
35 | 39 | $injector->define(Handler::class, [ |
36 | 40 | ':origin' => $origin, |