Completed
Pull Request — master (#68)
by De Cramer
03:16
created
src/eXpansion/Bundle/LocalRecords/Plugins/BaseRecords.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
      */
206 206
     protected function dispatchEvent($eventData)
207 207
     {
208
-        $event = $this->eventPrefix . '.' . $eventData['event'];
208
+        $event = $this->eventPrefix.'.'.$eventData['event'];
209 209
         unset($eventData['event']);
210 210
 
211 211
         $this->dispatcher->dispatch($event, [$eventData]);
Please login to merge, or discard this patch.
src/eXpansion/Bundle/LocalRecords/Services/RecordHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     const EVENT_TYPE_FIRST_TIME = 'first_time';
25 25
     const EVENT_TYPE_SAME_SCORE = 'same_score';
26
-    const EVENT_TYPE_SAME_POS =   'same_position';
26
+    const EVENT_TYPE_SAME_POS = 'same_position';
27 27
     const EVENT_TYPE_BETTER_POS = 'better_position';
28 28
 
29 29
     /**
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 $previousRecord = $this->records[$betterRecordIndex];
219 219
 
220 220
                 $this->records[$betterRecordIndex] = $record;
221
-                $this->records[$betterRecordIndex+1] = $previousRecord;
221
+                $this->records[$betterRecordIndex + 1] = $previousRecord;
222 222
 
223 223
                 $newPosition = $betterRecordIndex + 1;
224 224
                 $this->positionPerPlayer[$record->getPlayerLogin()] = $betterRecordIndex + 1;
Please login to merge, or discard this patch.
src/eXpansion/Bundle/LocalRecords/Plugins/ChatNotification.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -229,6 +229,10 @@
 block discarded – undo
229 229
         );
230 230
     }
231 231
 
232
+    /**
233
+     * @param string $message
234
+     * @param null|integer $recipe
235
+     */
232 236
     protected function sendMessage($message, $recipe, $params)
233 237
     {
234 238
         $this->chatNotification->sendMessage(
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             $firstRecord = $records[0];
67 67
 
68 68
             $this->sendMessage('loaded.top1', null, [
69
-               '%nickname%' => $firstRecord->getPlayerLogin(), // TODO get player nickname from database.
69
+                '%nickname%' => $firstRecord->getPlayerLogin(), // TODO get player nickname from database.
70 70
                 '%score%' => $this->timeFormater->milisecondsToTrackmania($firstRecord->getScore(), true)
71 71
             ]);
72 72
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     $this->sendMessage('loaded.any', $records[$i]->getPlayerLogin(), [
78 78
                         '%nickname%' => $onlinePlayers[$records[$i]->getPlayerLogin()]->getNickName(),
79 79
                         '%score%' => $this->timeFormater->milisecondsToTrackmania($records[$i]->getScore(), true),
80
-                        '%position%' => $i+1,
80
+                        '%position%' => $i + 1,
81 81
                     ]);
82 82
                 }
83 83
             }
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
     protected function getSecuredBy(Record $record, Record $oldRecord)
205 205
     {
206
-        $securedBy =$this->timeFormater->milisecondsToTrackmania($oldRecord->getScore() - $record->getScore(), true);
206
+        $securedBy = $this->timeFormater->milisecondsToTrackmania($oldRecord->getScore() - $record->getScore(), true);
207 207
 
208 208
         if (substr($securedBy, 0, 4) === "00:0") {
209 209
             $securedBy = substr($securedBy, 4);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             }
214 214
         }
215 215
 
216
-        return '-' . $securedBy;
216
+        return '-'.$securedBy;
217 217
     }
218 218
 
219 219
     protected function messageFirstPlaceNew(Record $record)
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
     protected function sendMessage($message, $recipe, $params)
233 233
     {
234 234
         $this->chatNotification->sendMessage(
235
-            $this->translationPrefix . '.' . $message,
235
+            $this->translationPrefix.'.'.$message,
236 236
             $recipe,
237 237
             $params
238 238
         );
Please login to merge, or discard this patch.
src/eXpansion/Bundle/LocalRecords/Entity/Record.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
      */
183 183
     public function setCheckpointTimes($checkpointTimes)
184 184
     {
185
-         $this->setCheckpoints(implode(',', $checkpointTimes));
185
+            $this->setCheckpoints(implode(',', $checkpointTimes));
186 186
     }
187 187
 
188 188
     /**
Please login to merge, or discard this patch.