Passed
Push — master ( 565c41...d8e277 )
by Frank
02:13
created
Classes/Commands/BottyCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * @var array
19 19
      */
20 20
     protected $cats = [':smiley_cat:', ':smile_cat:', ':heart_eyes_cat:', ':kissing_cat:',
21
-        ':smirk_cat:', ':scream_cat:', ':crying_cat_face:', ':joy_cat:' , ':pouting_cat:', ];
21
+        ':smirk_cat:', ':scream_cat:', ':crying_cat_face:', ':joy_cat:', ':pouting_cat:', ];
22 22
 
23 23
     /**
24 24
      * @var array
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function processMessage() : string
70 70
     {
71 71
         $message = strtolower($this->payload->getData()['text']);
72
-        $username = '<@' . $this->payload->getData()['user'] . '>';
72
+        $username = '<@'.$this->payload->getData()['user'].'>';
73 73
 
74 74
         if (strpos($message, 'help') !== false) {
75 75
             $result = [];
Please login to merge, or discard this patch.
Classes/Commands/TellCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $parts = explode(':', $notification['message']);
106 106
         $refId = (int) trim($parts[1]);
107
-        $result = $this->queryGerrit('change:' . $refId);
108
-        $msg = '*Hi <@' . $user . '>, <@' . $notification['from_user'] . '>'
107
+        $result = $this->queryGerrit('change:'.$refId);
108
+        $msg = '*Hi <@'.$user.'>, <@'.$notification['from_user'].'>'
109 109
             . ' ask you to look at this patch:*';
110 110
 
111 111
         if (is_array($result)) {
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $parts = explode(':', $notification['message']);
129 129
         $issueNumber = (int) trim($parts[1]);
130
-        $result = $this->queryForge('issues/' . $issueNumber);
130
+        $result = $this->queryForge('issues/'.$issueNumber);
131 131
         if ($result) {
132
-            $msg = '*Hi <@' . $user . '>, <@' . $notification['from_user'] . '>'
132
+            $msg = '*Hi <@'.$user.'>, <@'.$notification['from_user'].'>'
133 133
                 . ' ask you to look at this issue:*';
134
-            $this->sendResponse($msg . chr(10) . $this->buildIssueMessage($result->issue), $user);
134
+            $this->sendResponse($msg.chr(10).$this->buildIssueMessage($result->issue), $user);
135 135
         }
136 136
     }
137 137
 
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function processTextMessage(array $notification, string $user)
143 143
     {
144
-        $msg = '*Hi <@' . $user . '>, here is a message from <@' . $notification['from_user'] . '>' . ' for you:*';
145
-        $this->sendResponse($msg . chr(10) . $notification['message'], $user);
144
+        $msg = '*Hi <@'.$user.'>, here is a message from <@'.$notification['from_user'].'>'.' for you:*';
145
+        $this->sendResponse($msg.chr(10).$notification['message'], $user);
146 146
     }
147 147
 
148 148
     /**
@@ -168,6 +168,6 @@  discard block
 block discarded – undo
168 168
             'message' => $message,
169 169
         ]);
170 170
 
171
-        return 'OK, I will tell <@' . $toUser . '> about your message';
171
+        return 'OK, I will tell <@'.$toUser.'> about your message';
172 172
     }
173 173
 }
Please login to merge, or discard this patch.
Classes/Commands/AbstractCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         $command = !empty($params[0]) ? $params[0] : 'help';
100 100
         $this->params = $params;
101
-        $method = 'process' . ucfirst(strtolower($command));
101
+        $method = 'process'.ucfirst(strtolower($command));
102 102
         if (method_exists($this, $method)) {
103 103
             return $this->{$method}();
104 104
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         if ($user !== null) {
117 117
             $this->client->apiCall('im.open', ['user' => $user])
118
-                ->then(function (Payload $response) use ($messageToSent) {
118
+                ->then(function(Payload $response) use ($messageToSent) {
119 119
                     $channel = $response->getData()['channel']['id'];
120 120
                     $this->postMessage($messageToSent, $channel);
121 121
                 });
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function getHelp() : string
134 134
     {
135
-        $result = '*HELP*' . chr(10);
135
+        $result = '*HELP*'.chr(10);
136 136
         foreach ($this->helpCommands as $command => $helpText) {
137
-            $result .= "*{$this->commandName}:{$command}*: {$helpText}" . chr(10);
137
+            $result .= "*{$this->commandName}:{$command}*: {$helpText}".chr(10);
138 138
         }
139 139
 
140 140
         return $result;
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
                 break;
179 179
         }
180 180
         $attachment->setTitle($item->subject);
181
-        $attachment->setTitleLink('https://review.typo3.org/' . $item->_number);
181
+        $attachment->setTitleLink('https://review.typo3.org/'.$item->_number);
182 182
 
183
-        $text .= 'Branch: ' . $this->bold($branch) . ' | :calendar: ' . $this->bold($created)
184
-            . ' | ID: ' . $this->bold($item->_number) . chr(10);
185
-        $text .= '<https://review.typo3.org/' . $item->_number . '|:arrow_right: Goto Review>';
183
+        $text .= 'Branch: '.$this->bold($branch).' | :calendar: '.$this->bold($created)
184
+            . ' | ID: '.$this->bold($item->_number).chr(10);
185
+        $text .= '<https://review.typo3.org/'.$item->_number.'|:arrow_right: Goto Review>';
186 186
 
187 187
         $attachment->setText($text);
188 188
         $attachment->setFallback($text);
Please login to merge, or discard this patch.
Classes/Commands/ForgeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $issueNumber = (int) $matches[1][0];
51 51
         }
52 52
         $issueNumber = $issueNumber ?? $value;
53
-        if ((int)$issueNumber === 0) {
53
+        if ((int) $issueNumber === 0) {
54 54
             return 'hey, I need an issue number!';
55 55
         }
56 56
         $result = $this->queryForge("issues/{$issueNumber}");
Please login to merge, or discard this patch.