Completed
Push — master ( aa45ca...3f2e9d )
by Dan
01:38
created
src/Plugin/PluginManager.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@  discard block
 block discarded – undo
84 84
         $this->updatePrefixes($authedUser->getUsername());
85 85
     }
86 86
 
87
+    /**
88
+     * @param string $text
89
+     */
87 90
     public function matchesPrefix($prefix, $text) : array
88 91
     {
89 92
         if ($prefix === self::NO_PREFIX) {
@@ -195,6 +198,9 @@  discard block
 block discarded – undo
195 198
         return $this->authedUser;
196 199
     }
197 200
 
201
+    /**
202
+     * @param string $authedUsername
203
+     */
198 204
     protected function updatePrefixes($authedUsername)
199 205
     {
200 206
         $updatedPriorityMap = [];
Please login to merge, or discard this patch.
src/Message/MessageFactory.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -130,6 +130,9 @@  discard block
 block discarded – undo
130 130
         return $readable ? $readable : $entity;
131 131
     }
132 132
 
133
+    /**
134
+     * @param string $readable
135
+     */
133 136
     public function formatUser(string $entity, $readable = null) : string
134 137
     {
135 138
         if ($readable) {
@@ -144,6 +147,9 @@  discard block
 block discarded – undo
144 147
         return $entity;
145 148
     }
146 149
 
150
+    /**
151
+     * @param string $readable
152
+     */
147 153
     public function formatChannel(string $entity, $readable = null) : string
148 154
     {
149 155
         if ($readable) {
@@ -158,6 +164,9 @@  discard block
 block discarded – undo
158 164
         return $entity;
159 165
     }
160 166
 
167
+    /**
168
+     * @param string $param
169
+     */
161 170
     protected function isMessageChanged(array $data, $param = null): bool
162 171
     {
163 172
         return isset($data['subtype'])
Please login to merge, or discard this patch.
src/Yabot.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
         }
116 116
 
117 117
         $this->getSlack()->reconnect()->then(
118
-            function () {
118
+            function() {
119 119
                 $this->getLog()->info('Reconnected');
120 120
                 $this->monitor = $this->startConnectionMonitor();
121 121
             },
122
-            function () {
122
+            function() {
123 123
                 $this->getLog()->error('Reconnect failed, shutting down.');
124 124
                 $this->shutDown();
125 125
             }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     protected function logMessage($data)
209 209
     {
210 210
         if ($this->messageLog !== null) {
211
-            file_put_contents($this->messageLog, json_encode($data) . "\n", FILE_APPEND);
211
+            file_put_contents($this->messageLog, json_encode($data)."\n", FILE_APPEND);
212 212
         }
213 213
     }
214 214
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
             $this->ping();
226 226
 
227
-            return $this->loop->addPeriodicTimer($interval, function () {
227
+            return $this->loop->addPeriodicTimer($interval, function() {
228 228
                 $this->checkPong();
229 229
                 $this->ping();
230 230
             });
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         $this->getSlack()->ping()
259 259
             ->then(
260
-                function (Payload $payload) {
260
+                function(Payload $payload) {
261 261
                     $this->getLog()->info($payload->toJson());
262 262
                     $this->pong = true;
263 263
                 }
@@ -274,16 +274,16 @@  discard block
 block discarded – undo
274 274
     protected function connect()
275 275
     {
276 276
         Timer\timeout($this->getSlack()->connect(), 30, $this->getLoop())
277
-            ->then(function () {
277
+            ->then(function() {
278 278
                 $this->getLog()->info('Connected.');
279 279
                 $this->connected();
280 280
             })
281
-            ->otherwise(function (Timer\TimeoutException $error) {
281
+            ->otherwise(function(Timer\TimeoutException $error) {
282 282
                 $this->getLog()->error($error->getMessage());
283 283
                 $this->getLog()->error('Connection failed, shutting down.');
284 284
                 $this->shutDown();
285 285
             })
286
-            ->otherwise(function ($error) {
286
+            ->otherwise(function($error) {
287 287
                 $this->getLog()->error('Connection failed, shutting down.');
288 288
                 $this->shutDown();
289 289
             });
Please login to merge, or discard this patch.