@@ -118,7 +118,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/../config/config.php'; |
|
3 | +require_once __DIR__.'/../config/config.php'; |
|
4 | 4 | |
5 | 5 | return $GLOBALS['config']['db']; |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | $patchId = (int) $this->resolvePatchIdFromUrl($json->{'change-url'}); |
52 | 52 | $patchSet = property_exists($json, 'patchset') ? (int) $json->patchset : 0; |
53 | 53 | |
54 | - $item = $this->queryGerrit('change:' . $patchId)[0]; |
|
54 | + $item = $this->queryGerrit('change:'.$patchId)[0]; |
|
55 | 55 | $created = substr($item->created, 0, 19); |
56 | - $text = "Branch: {$json->branch} | :calendar: {$created} | ID: {$item->_number}" . chr(10); |
|
56 | + $text = "Branch: {$json->branch} | :calendar: {$created} | ID: {$item->_number}".chr(10); |
|
57 | 57 | $text .= ":link: <https://review.typo3.org/{$item->_number}|Goto Review>"; |
58 | 58 | if ($hook === 'patchset-created' && $patchSet === 1 && $json->branch === 'master') { |
59 | - $message = $this->buildMessage('[NEW] ' . $item->subject, $text); |
|
59 | + $message = $this->buildMessage('[NEW] '.$item->subject, $text); |
|
60 | 60 | $this->sendMessageToChannel($hook, $message); |
61 | 61 | } elseif ($hook === 'change-merged') { |
62 | - $message = $this->buildMessage(':white_check_mark: [MERGED] ' . $item->subject, $text, Message\Attachment::COLOR_GOOD); |
|
62 | + $message = $this->buildMessage(':white_check_mark: [MERGED] '.$item->subject, $text, Message\Attachment::COLOR_GOOD); |
|
63 | 63 | $this->sendMessageToChannel($hook, $message); |
64 | 64 | $this->checkFiles($patchId, $json->commit); |
65 | 65 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $attachment->setColor($color[$status]); |
138 | 138 | $attachment->setTitle($text[$status]); |
139 | 139 | |
140 | - $text = ':link: <https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/' . $fileName . '|' . $fileName . '>'; |
|
140 | + $text = ':link: <https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/'.$fileName.'|'.$fileName.'>'; |
|
141 | 141 | $attachment->setText($text); |
142 | 142 | $attachment->setFallback($text); |
143 | 143 | return $attachment; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | if ($this->logger === null) { |
27 | 27 | $this->logger = new Logger('application'); |
28 | - $this->logger->pushHandler(new StreamHandler($GLOBALS['config']['log']['file'], (int)$GLOBALS['config']['log']['level'])); |
|
28 | + $this->logger->pushHandler(new StreamHandler($GLOBALS['config']['log']['file'], (int) $GLOBALS['config']['log']['level'])); |
|
29 | 29 | } |
30 | 30 | return $this->logger; |
31 | 31 | } |