@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | private $allowSkip = false; |
| 22 | 22 | |
| 23 | - function __construct(string $name = ''){ |
|
| 23 | + function __construct(string $name = '') { |
|
| 24 | 24 | $this->name = $name; |
| 25 | 25 | } |
| 26 | 26 | public function __toString() { |
@@ -63,16 +63,16 @@ discard block |
||
| 63 | 63 | public function getCategoryWait() { |
| 64 | 64 | return $this->expectedCategoryWait; |
| 65 | 65 | } |
| 66 | - public function getTournamentTime(){ |
|
| 66 | + public function getTournamentTime() { |
|
| 67 | 67 | $games = count($this->getGames()); |
| 68 | 68 | return $games*$this->expectedPlay+$games*$this->expectedGameWait+count($this->getRounds())*$this->expectedRoundWait+count($this->getCategories())*$this->expectedCategoryWait; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function allowSkip(){ |
|
| 71 | + public function allowSkip() { |
|
| 72 | 72 | $this->allowSkip = true; |
| 73 | 73 | return $this; |
| 74 | 74 | } |
| 75 | - public function disallowSkip(){ |
|
| 75 | + public function disallowSkip() { |
|
| 76 | 76 | $this->allowSkip = false; |
| 77 | 77 | return $this; |
| 78 | 78 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | return $this->allowSkip; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - public function addCategory(Category ...$categories){ |
|
| 87 | + public function addCategory(Category ...$categories) { |
|
| 88 | 88 | foreach ($categories as $category) { |
| 89 | 89 | $this->categories[] = $category; |
| 90 | 90 | } |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | return $this->id; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - public function allowSkip(){ |
|
| 53 | + public function allowSkip() { |
|
| 54 | 54 | $this->generator->allowSkip(); |
| 55 | 55 | return $this; |
| 56 | 56 | } |
| 57 | - public function disallowSkip(){ |
|
| 57 | + public function disallowSkip() { |
|
| 58 | 58 | $this->generator->disallowSkip(); |
| 59 | 59 | return $this; |
| 60 | 60 | } |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | public function addProgressed(...$teams) { |
| 164 | - $this->progressed = array_merge($this->progressed, array_filter($teams, function($a){return $a instanceof Team;})); |
|
| 165 | - foreach (array_filter($teams, function($a){return is_array($a);}) as $team) { |
|
| 164 | + $this->progressed = array_merge($this->progressed, array_filter($teams, function($a) {return $a instanceof Team; })); |
|
| 165 | + foreach (array_filter($teams, function($a) {return is_array($a); }) as $team) { |
|
| 166 | 166 | $this->progressed = array_merge($this->progressed, array_filter($team, function($a) { |
| 167 | 167 | return ($a instanceof Team); |
| 168 | 168 | })); |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | $this->games[] = $g; |
| 184 | 184 | return $g; |
| 185 | 185 | } |
| 186 | - public function addGame(...$games){ |
|
| 187 | - $this->games = array_merge($this->games, array_filter($games, function($a){ return ($a instanceof Game); })); |
|
| 186 | + public function addGame(...$games) { |
|
| 187 | + $this->games = array_merge($this->games, array_filter($games, function($a) { return ($a instanceof Game); })); |
|
| 188 | 188 | |
| 189 | - foreach (array_filter($games, function($a){return is_array($a);}) as $key => $game) { |
|
| 190 | - $this->games = array_merge($this->games, array_filter($game, function($a){ return ($a instanceof Game); })); |
|
| 189 | + foreach (array_filter($games, function($a) {return is_array($a); }) as $key => $game) { |
|
| 190 | + $this->games = array_merge($this->games, array_filter($game, function($a) { return ($a instanceof Game); })); |
|
| 191 | 191 | } |
| 192 | 192 | return $this; |
| 193 | 193 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | return $this; |
| 211 | 211 | } |
| 212 | - public function isPlayed(){ |
|
| 212 | + public function isPlayed() { |
|
| 213 | 213 | if (count($this->games) === 0) return false; |
| 214 | 214 | foreach ($this->games as $game) { |
| 215 | 215 | if (!$game->isPlayed()) return false; |