Passed
Push — master ( afbb7b...1670bf )
by Patrick
03:38
created
GitlabClient/Shared/Plugin/GitlabActivityPluginTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $_ENV['GITLAB_PATTERN'] = self::TICKET_PATTERN;
29 29
         $activityDtoCollection = $this->createGitlabActivityPlugin()->collect();
30
-        static::assertSame(self::TICKET_PATTERN.'-1234', $activityDtoCollection->offsetGet(0)->needle);
30
+        static::assertSame(self::TICKET_PATTERN . '-1234', $activityDtoCollection->offsetGet(0)->needle);
31 31
         static::assertSame('Entwicklungsprozess: TESTNR-1234 (commented on)', $activityDtoCollection->offsetGet(0)->description);
32 32
         static::assertSame('2021-01-01', $activityDtoCollection->offsetGet(0)->created->format('Y-m-d'));
33 33
         static::assertSame(GitlabActivityPlugin::ACTIVITY_DURATION, $activityDtoCollection->offsetGet(0)->duration);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         ;
42 42
 
43 43
         $testEvent1 = new \stdClass();
44
-        $testEvent1->target_title = self::TICKET_PATTERN.'-1234';
44
+        $testEvent1->target_title = self::TICKET_PATTERN . '-1234';
45 45
         $testEvent1->action_name = GitlabActivityPlugin::ALLOWED_ACTION_NAMES[0];
46 46
         $testEvent1->created_at = '2021-01-01 00:00:00';
47 47
 
Please login to merge, or discard this patch.
MattermostClient/Shared/Plugin/MattermostActivityPluginTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $_ENV['MATTERMOST_PATTERN'] = self::TICKET_PATTERN;
29 29
         $activityDtoCollection = $this->createMattermostActivityPlugin()->collect();
30
-        static::assertSame(self::TICKET_PATTERN.'-1234', $activityDtoCollection->offsetGet(0)->needle);
31
-        static::assertSame(MattermostActivityPlugin::POST_SUFFIX.': TESTNR-1234', $activityDtoCollection->offsetGet(0)->description);
30
+        static::assertSame(self::TICKET_PATTERN . '-1234', $activityDtoCollection->offsetGet(0)->needle);
31
+        static::assertSame(MattermostActivityPlugin::POST_SUFFIX . ': TESTNR-1234', $activityDtoCollection->offsetGet(0)->description);
32 32
         static::assertSame((new \DateTime())->format('Y-m-d'), $activityDtoCollection->offsetGet(0)->created->format('Y-m-d'));
33 33
         static::assertSame(MattermostActivityPlugin::ACTIVITY_DURATION, $activityDtoCollection->offsetGet(0)->duration);
34 34
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         ;
50 50
         $mattermostClientFacadeMock
51 51
             ->method('getPosts')
52
-            ->willReturn([['message' => 'testmessage '.self::TICKET_PATTERN.'-1234', 'create_at' => (new \DateTime())->format('U') * 1000]])
52
+            ->willReturn([['message' => 'testmessage ' . self::TICKET_PATTERN . '-1234', 'create_at' => (new \DateTime())->format('U') * 1000]])
53 53
         ;
54 54
 
55 55
         $mattermostActivityPluginMock = $this->getMockBuilder(MattermostActivityPlugin::class)
Please login to merge, or discard this patch.
src/ForecastAutomation/MattermostClient/Business/MattermostApi.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
             sprintf(self::CHANNEL_API, $this->mattermostConfigDto->teamId),
37 37
             [
38 38
                 'headers' => [
39
-                    'Authorization' => 'Bearer '.static::$token,
39
+                    'Authorization' => 'Bearer ' . static::$token,
40 40
                     'Content-Type' => 'application/json',
41 41
                 ],
42 42
             ]
43 43
         );
44
-        $channelArray = json_decode((string) $res->getBody(), null, 512, JSON_THROW_ON_ERROR);
44
+        $channelArray = json_decode((string)$res->getBody(), null, 512, JSON_THROW_ON_ERROR);
45 45
 
46 46
         return $this->applyChannelFilter($channelArray, $channelFilterCollection);
47 47
     }
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
             'GET',
54 54
             sprintf(self::POSTS_API, $postsQueryDto->channelId),
55 55
             [
56
-                'query' => ['since' => (int) $postsQueryDto->since->format('U') * 1000],
56
+                'query' => ['since' => (int)$postsQueryDto->since->format('U') * 1000],
57 57
                 'headers' => [
58
-                    'Authorization' => 'Bearer '.static::$token,
58
+                    'Authorization' => 'Bearer ' . static::$token,
59 59
                     'Content-Type' => 'application/json',
60 60
                 ],
61 61
             ],
62 62
         );
63 63
 
64
-        return json_decode((string) $res->getBody(), true, 512, JSON_THROW_ON_ERROR)['posts'];
64
+        return json_decode((string)$res->getBody(), true, 512, JSON_THROW_ON_ERROR)['posts'];
65 65
     }
66 66
 
67 67
     private function auth(): string
Please login to merge, or discard this patch.
MattermostClient/Shared/Plugin/Filter/HasMessageChannelFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $filteredChannel = [];
25 25
         foreach ($channelCollection as $channel) {
26 26
             if ($channel->total_msg_count > 0
27
-                && $channel->last_post_at >= ((int) $this->lastPostDateTime->format('U') * 1000)) {
27
+                && $channel->last_post_at >= ((int)$this->lastPostDateTime->format('U') * 1000)) {
28 28
                 $filteredChannel[] = $channel;
29 29
             }
30 30
         }
Please login to merge, or discard this patch.
ForecastAutomationTests/MattermostClient/MattermostClientFacadeTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function testCanGetChannel(): void
38 38
     {
39 39
         $channels = $this->createMattermostClientFacade(
40
-            $this->createChannelResponse((int) ((new \DateTime(self::LAST_POST))->format('U')) * 1000)
40
+            $this->createChannelResponse((int)((new \DateTime(self::LAST_POST))->format('U')) * 1000)
41 41
         )->getChannel(
42 42
             [
43 43
                 new HasMessageChannelFilter(new \DateTime(self::CHANNEL_FILTER_LAST_POSTS)),
@@ -103,6 +103,6 @@  discard block
 block discarded – undo
103 103
 
104 104
     private function createChannelResponse(int $lastPostAt): string
105 105
     {
106
-        return '[{"id":"test-id-1234","total_msg_count":'.self::MSG_COUNT.',"type":"'.self::CHANNEL_TYPE.'","last_post_at":'.$lastPostAt.'}]';
106
+        return '[{"id":"test-id-1234","total_msg_count":' . self::MSG_COUNT . ',"type":"' . self::CHANNEL_TYPE . '","last_post_at":' . $lastPostAt . '}]';
107 107
     }
108 108
 }
Please login to merge, or discard this patch.