Completed
Push — master ( 9f1209...2e32e6 )
by Frank
02:07
created
Classes/Commands/ReviewCommand.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
         $countMinus2 = count($result);
60 60
 
61 61
         $returnString = '';
62
-        $returnString .= 'There are currently ' . $this->bold($count) . ' open reviews for project '
63
-            . $this->italic($project) . ' and branch master on <https://review.typo3.org/#/q/project:' . $project
64
-            . '+status:open+branch:master|https://review.typo3.org>' . chr(10);
65
-        $returnString .= $this->bold($countMinus1) . ' of ' . $this->bold($count) . ' open reviews voted with '
66
-            . $this->bold('-1') . ' <https://review.typo3.org/#/q/label:Code-Review%253D-1+is:open+branch:'
67
-            . 'master+project:' . $project . '|Check now> ' . chr(10);
68
-        $returnString .= $this->bold($countMinus2) . ' of ' . $this->bold($count) . ' open reviews voted with '
69
-            . $this->bold('-2') . ' <https://review.typo3.org/#/q/label:Code-Review%253D-2+is:open+branch:'
70
-            . 'master+project:' . $project . '|Check now>';
62
+        $returnString .= 'There are currently '.$this->bold($count).' open reviews for project '
63
+            . $this->italic($project).' and branch master on <https://review.typo3.org/#/q/project:'.$project
64
+            . '+status:open+branch:master|https://review.typo3.org>'.chr(10);
65
+        $returnString .= $this->bold($countMinus1).' of '.$this->bold($count).' open reviews voted with '
66
+            . $this->bold('-1').' <https://review.typo3.org/#/q/label:Code-Review%253D-1+is:open+branch:'
67
+            . 'master+project:'.$project.'|Check now> '.chr(10);
68
+        $returnString .= $this->bold($countMinus2).' of '.$this->bold($count).' open reviews voted with '
69
+            . $this->bold('-2').' <https://review.typo3.org/#/q/label:Code-Review%253D-2+is:open+branch:'
70
+            . 'master+project:'.$project.'|Check now>';
71 71
 
72 72
         return $returnString;
73 73
     }
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
         if ($username === null) {
99 99
             return 'hey, I need a username!';
100 100
         }
101
-        $results = $this->queryGerrit('is:open owner:"' . $username . '" project:' . $project);
101
+        $results = $this->queryGerrit('is:open owner:"'.$username.'" project:'.$project);
102 102
         if (!empty($results)) {
103
-            $listOfItems = ['*Here are the results for ' . $username . '*:'];
103
+            $listOfItems = ['*Here are the results for '.$username.'*:'];
104 104
             foreach ($results as $item) {
105 105
                 $listOfItems[] = $this->buildReviewLine($item);
106 106
             }
107 107
             return implode(chr(10), $listOfItems);
108 108
         }
109
-        return $username . ' has no open reviews or username is unknown';
109
+        return $username.' has no open reviews or username is unknown';
110 110
     }
111 111
 
112 112
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $paramsCount = count($this->params);
145 145
         $changeIds = [];
146 146
         for ($i = 1; $i < $paramsCount; ++$i) {
147
-            $changeIds[] = 'change:' . $this->params[$i];
147
+            $changeIds[] = 'change:'.$this->params[$i];
148 148
         }
149 149
         $result = $this->queryGerrit(implode(' OR ', $changeIds));
150 150
         $listOfItems = [];
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     protected function buildReviewMessageOutput(int $refId)
165 165
     {
166
-        $result = $this->queryGerrit('change:' . $refId);
166
+        $result = $this->queryGerrit('change:'.$refId);
167 167
         if (!empty($result)) {
168 168
             foreach ($result as $item) {
169 169
                 if ($item->_number === $refId) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             return 'hey, I need a query!';
188 188
         }
189 189
 
190
-        $results = $this->queryGerrit('limit:50 ' . $query);
190
+        $results = $this->queryGerrit('limit:50 '.$query);
191 191
         if (!empty($results)) {
192 192
             $listOfItems = ["*Here are the results for {$query}*:"];
193 193
             foreach ($results as $item) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         $cnt = count($result);
217 217
 
218
-        return 'Good job folks, since ' . $date . ' you merged *' . $cnt . '* patches into master';
218
+        return 'Good job folks, since '.$date.' you merged *'.$cnt.'* patches into master';
219 219
     }
220 220
 
221 221
     /**
Please login to merge, or discard this patch.
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
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function process() : string
62 62
     {
63 63
         $message = strtolower($this->payload->getData()['text']);
64
-        $username = '<@' . $this->payload->getData()['user'] . '>';
64
+        $username = '<@'.$this->payload->getData()['user'].'>';
65 65
 
66 66
         if (strpos($message, 'help') !== false) {
67 67
             $result = [];
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
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
         $command = !empty($params[0]) ? $params[0] : 'help';
120 120
         $this->params = $params;
121
-        $method = 'process' . ucfirst(strtolower($command));
121
+        $method = 'process'.ucfirst(strtolower($command));
122 122
         if (method_exists($this, $method)) {
123 123
             return $this->{$method}();
124 124
         }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         if ($user !== null) {
137 137
             $this->client->apiCall('im.open', ['user' => $user])
138
-                ->then(function (Payload $response) use ($messageToSent) {
138
+                ->then(function(Payload $response) use ($messageToSent) {
139 139
                     $channel = $response->getData()['channel']['id'];
140 140
                     $this->postMessage($messageToSent, $channel);
141 141
                 });
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getHelp() : string
154 154
     {
155
-        $result = '*HELP*' . chr(10);
155
+        $result = '*HELP*'.chr(10);
156 156
         foreach ($this->helpCommands as $command => $helpText) {
157
-            $result .= "*{$this->commandName}:{$command}*: {$helpText}" . chr(10);
157
+            $result .= "*{$this->commandName}:{$command}*: {$helpText}".chr(10);
158 158
         }
159 159
 
160 160
         return $result;
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
         $attachment->setColor($color);
181 181
         $attachment->setPretext($preText);
182 182
         $attachment->setTitle($item->subject);
183
-        $attachment->setTitleLink('https://review.typo3.org/' . $item->_number);
183
+        $attachment->setTitleLink('https://review.typo3.org/'.$item->_number);
184 184
 
185
-        $text = 'Branch: ' . $this->bold($branch) . ' | :calendar: ' . $this->bold($created)
186
-            . ' | ID: ' . $this->bold($item->_number) . chr(10);
187
-        $text .= '<https://review.typo3.org/' . $item->_number . '|:arrow_right: Goto Review>';
185
+        $text = 'Branch: '.$this->bold($branch).' | :calendar: '.$this->bold($created)
186
+            . ' | ID: '.$this->bold($item->_number).chr(10);
187
+        $text .= '<https://review.typo3.org/'.$item->_number.'|:arrow_right: Goto Review>';
188 188
 
189 189
         $attachment->setText($text);
190 190
         $attachment->setFallback($text);
Please login to merge, or discard this patch.