Completed
Pull Request — master (#1)
by Guillermo
04:23
created
src/PlayersCollection.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     /**
75 75
      * @param Player[] ...$players
76
+     * @param Player $players
76 77
      */
77 78
     private function excludePlayers(...$players)
78 79
     {
@@ -126,7 +127,7 @@  discard block
 block discarded – undo
126 127
     }
127 128
 
128 129
     /**
129
-     * @param array $list
130
+     * @param Player[] $list
130 131
      * @return array
131 132
      */
132 133
     private function shuffleAssoc($list)
Please login to merge, or discard this patch.
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
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         foreach ($players as $mainPlayer) {
85 85
             foreach ($players as $player) {
86
-                if ($mainPlayer->id() == $player->id()){
86
+                if ($mainPlayer->id() == $player->id()) {
87 87
                     continue;
88 88
                 }
89 89
                 $this->excludePlayers[$mainPlayer->id()][] = $player->id();
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
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 
81 81
         $retry = count($this->players) + $this->players->countExcludePlayers();
82 82
 
83
-        while (!$this->tryMatchSecretSantaPlayers() && $retry > 0 ) {
83
+        while (!$this->tryMatchSecretSantaPlayers() && $retry > 0) {
84 84
             $retry--;
85 85
         }
86 86
 
Please login to merge, or discard this patch.