Passed
Pull Request — master (#24)
by Patrick
13:26 queued 09:45
created
src/ForecastAutomation/MattermostClient/Business/MattermostApi.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $this->auth();
35 35
 
36
-        $wrapPromise = new Promise(function () use ($channelFilterCollection, &$wrapPromise) {
36
+        $wrapPromise = new Promise(function() use ($channelFilterCollection, &$wrapPromise) {
37 37
             $res = $this->guzzleClient->requestAsync(
38 38
                 'GET',
39 39
                 sprintf(self::CHANNEL_API, $this->mattermostConfigDto->teamId),
40 40
                 [
41 41
                     'headers' => [
42
-                        'Authorization' => 'Bearer '.static::$token,
42
+                        'Authorization' => 'Bearer ' . static::$token,
43 43
                         'Content-Type' => 'application/json',
44 44
                     ],
45 45
                 ]
46 46
             )->wait();
47 47
 
48
-            $channelArray = json_decode((string) $res->getBody(), null, JSON_PARTIAL_OUTPUT_ON_ERROR, JSON_THROW_ON_ERROR);
48
+            $channelArray = json_decode((string)$res->getBody(), null, JSON_PARTIAL_OUTPUT_ON_ERROR, JSON_THROW_ON_ERROR);
49 49
             $wrapPromise->resolve($this->applyChannelFilter($channelArray, $channelFilterCollection));
50 50
         });
51 51
 
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $this->auth();
58 58
 
59
-        $wrapPromise = new Promise(function () use ($postsQueryDto, &$wrapPromise) {
59
+        $wrapPromise = new Promise(function() use ($postsQueryDto, &$wrapPromise) {
60 60
             $res = $this->guzzleClient->requestAsync(
61 61
                 'GET',
62 62
                 sprintf(self::POSTS_API, $postsQueryDto->channelId),
63 63
                 [
64
-                    'query' => ['since' => (int) $postsQueryDto->since->format('U') * 1000],
64
+                    'query' => ['since' => (int)$postsQueryDto->since->format('U') * 1000],
65 65
                     'headers' => [
66
-                        'Authorization' => 'Bearer '.static::$token,
66
+                        'Authorization' => 'Bearer ' . static::$token,
67 67
                         'Content-Type' => 'application/json',
68 68
                     ],
69 69
                 ],
70 70
             )->wait();
71 71
 
72
-            $wrapPromise->resolve(json_decode((string) $res->getBody(), true, JSON_PARTIAL_OUTPUT_ON_ERROR, JSON_THROW_ON_ERROR)['posts']);
72
+            $wrapPromise->resolve(json_decode((string)$res->getBody(), true, JSON_PARTIAL_OUTPUT_ON_ERROR, JSON_THROW_ON_ERROR)['posts']);
73 73
         });
74 74
 
75 75
         return $wrapPromise;
Please login to merge, or discard this patch.
tests/ForecastAutomationTests/GuzzleClient/Shared/GuzzleFactoryHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 {
24 24
     public function createResolvedPromise($data): PromiseInterface
25 25
     {
26
-        $resolvedPromise = new Promise(function () use (&$resolvedPromise, $data) {
26
+        $resolvedPromise = new Promise(function() use (&$resolvedPromise, $data) {
27 27
             $resolvedPromise->resolve($data);
28 28
         });
29 29
         return $resolvedPromise;
Please login to merge, or discard this patch.