@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | $this->setId($id ?? uniqid()); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function allowSkip(){ |
|
| 31 | + public function allowSkip() { |
|
| 32 | 32 | $this->generator->allowSkip(); |
| 33 | 33 | return $this; |
| 34 | 34 | } |
| 35 | - public function disallowSkip(){ |
|
| 35 | + public function disallowSkip() { |
|
| 36 | 36 | $this->generator->disallowSkip(); |
| 37 | 37 | return $this; |
| 38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function addTeam(...$teams) { |
| 48 | - \array_walk_recursive($teams, function($team){ |
|
| 48 | + \array_walk_recursive($teams, function($team) { |
|
| 49 | 49 | $this->setTeam($team); |
| 50 | 50 | }); |
| 51 | 51 | return $this; |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | return $this; |
| 179 | 179 | } |
| 180 | 180 | public function addProgressed(...$teams) { |
| 181 | - $this->progressed = array_merge($this->progressed, array_map(function ($a) {return $a->getId();}, array_filter($teams, function($a){return $a instanceof Team;}))); |
|
| 182 | - foreach (array_filter($teams, function($a){return is_array($a);}) as $team) { |
|
| 183 | - $this->progressed = array_merge($this->progressed, array_map(function ($a) {return $a->getId();}, array_filter($team, function($a) { |
|
| 181 | + $this->progressed = array_merge($this->progressed, array_map(function($a) {return $a->getId(); }, array_filter($teams, function($a) {return $a instanceof Team; }))); |
|
| 182 | + foreach (array_filter($teams, function($a) {return is_array($a); }) as $team) { |
|
| 183 | + $this->progressed = array_merge($this->progressed, array_map(function($a) {return $a->getId(); }, array_filter($team, function($a) { |
|
| 184 | 184 | return ($a instanceof Team); |
| 185 | 185 | }))); |
| 186 | 186 | } |
@@ -200,8 +200,8 @@ discard block |
||
| 200 | 200 | $this->games[] = $g; |
| 201 | 201 | return $g; |
| 202 | 202 | } |
| 203 | - public function addGame(...$games){ |
|
| 204 | - array_walk_recursive($games, function($game){ |
|
| 203 | + public function addGame(...$games) { |
|
| 204 | + array_walk_recursive($games, function($game) { |
|
| 205 | 205 | if ($game instanceof Game) $this->games[] = $game; |
| 206 | 206 | }); |
| 207 | 207 | return $this; |
@@ -224,9 +224,9 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | return $this; |
| 226 | 226 | } |
| 227 | - public function isPlayed(){ |
|
| 227 | + public function isPlayed() { |
|
| 228 | 228 | if (count($this->games) === 0) return false; |
| 229 | - return count(array_filter($this->games, function($a){return $a->isPlayed();})) !== 0; |
|
| 229 | + return count(array_filter($this->games, function($a) {return $a->isPlayed(); })) !== 0; |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | } |