Completed
Push — master ( 2c5d9f...5563e1 )
by Guillermo
01:16
created
src/PlayersCollection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             throw new PlayersCollectionException('The couple can not be the same player');
38 38
         }
39 39
 
40
-        if (!$this->isDuplicatePlayer($player) && !$this->isDuplicatePlayer($couple) ) {
40
+        if (!$this->isDuplicatePlayer($player) && !$this->isDuplicatePlayer($couple)) {
41 41
             $this->players[$player->id()] = $player;
42 42
             $this->players[$couple->id()] = $couple;
43 43
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     {
103 103
         foreach ($players as $mainPlayer) {
104 104
             foreach ($players as $player) {
105
-                if ($mainPlayer->id() == $player->id()){
105
+                if ($mainPlayer->id() == $player->id()) {
106 106
                     continue;
107 107
                 }
108 108
                 $this->exclusivePlayers[$mainPlayer->id()][] = $player->id();
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,9 @@  discard block
 block discarded – undo
177 177
      */
178 178
     private function shuffleAssoc(array $list)
179 179
     {
180
-        if (!is_array($list)) return $list;
180
+        if (!is_array($list)) {
181
+            return $list;
182
+        }
181 183
 
182 184
         $keys = $this->forceShuffle(array_keys($list));
183 185
         $random = [];
@@ -194,7 +196,9 @@  discard block
 block discarded – undo
194 196
      */
195 197
     private function forceShuffle(array $list)
196 198
     {
197
-        if (!is_array($list) || count($list) < 2) return $list;
199
+        if (!is_array($list) || count($list) < 2) {
200
+            return $list;
201
+        }
198 202
 
199 203
         $shuffleList = $list;
200 204
         while ($shuffleList == $list) {
Please login to merge, or discard this patch.
src/SecretSanta.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 
113 113
         $retry = count($this->players) + $this->players->countExclusivePlayers();
114 114
 
115
-        while (!$this->tryMatchSecretSantaPlayers() && $retry > 0 ) {
115
+        while (!$this->tryMatchSecretSantaPlayers() && $retry > 0) {
116 116
             $retry--;
117 117
         }
118 118
 
Please login to merge, or discard this patch.