@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use Faker\Factory as Faker; |
|
| 4 | 3 | use Illuminate\Database\Seeder; |
| 5 | 4 | use Illuminate\Foundation\Auth\User; |
| 6 | 5 | use Xoco70\KendoTournaments\Models\Championship; |
@@ -169,8 +169,9 @@ |
||
| 169 | 169 | |
| 170 | 170 | public function buildName() |
| 171 | 171 | { |
| 172 | - if ($this->settings != null && $this->settings->alias != null) |
|
| 173 | - return $this->settings->alias; |
|
| 172 | + if ($this->settings != null && $this->settings->alias != null) { |
|
| 173 | + return $this->settings->alias; |
|
| 174 | + } |
|
| 174 | 175 | |
| 175 | 176 | if ($this->hasNoCustomSettings()) { |
| 176 | 177 | return $this->category->name; |
@@ -10,8 +10,6 @@ |
||
| 10 | 10 | use Xoco70\KendoTournaments\Models\Championship; |
| 11 | 11 | use Xoco70\KendoTournaments\Models\ChampionshipSettings; |
| 12 | 12 | use Xoco70\KendoTournaments\Models\Competitor; |
| 13 | -use Xoco70\KendoTournaments\Models\Fight; |
|
| 14 | -use Xoco70\KendoTournaments\Models\FightersGroup; |
|
| 15 | 13 | use Xoco70\KendoTournaments\Models\Team; |
| 16 | 14 | use Xoco70\KendoTournaments\Models\Tournament; |
| 17 | 15 | |
@@ -3,7 +3,9 @@ |
||
| 3 | 3 | $top = \App\Bracket::getTopFight($numRound, $numFight) + $topOffset; |
| 4 | 4 | |
| 5 | 5 | $left = \App\Bracket::getLeftFight($numRound); |
| 6 | -if ($numRound== 3) dump(\App\Bracket::getTopFight($numRound, $numFight),$topOffset); |
|
| 6 | +if ($numRound== 3) { |
|
| 7 | + dump(\App\Bracket::getTopFight($numRound, $numFight),$topOffset); |
|
| 8 | +} |
|
| 7 | 9 | ?> |
| 8 | 10 | |
| 9 | 11 | <div class="match-wrapper" style="top: {{ $top }}px; left: {{$left}}px; width: 150px;"> |
@@ -2,9 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Xoco70\KendoTournaments\Models; |
| 4 | 4 | |
| 5 | -use Illuminate\Database\Eloquent\Model; |
|
| 6 | -use Illuminate\Support\Collection; |
|
| 7 | - |
|
| 8 | 5 | class DirectEliminationFight extends Fight |
| 9 | 6 | { |
| 10 | 7 | public function __construct(Fight $fight = null) |
@@ -392,7 +392,9 @@ |
||
| 392 | 392 | { |
| 393 | 393 | foreach ($groupsByRound as $keyGroup => $group) { |
| 394 | 394 | $parentGroup = $group->parent; |
| 395 | - if ($parentGroup == null) break; |
|
| 395 | + if ($parentGroup == null) { |
|
| 396 | + break; |
|
| 397 | + } |
|
| 396 | 398 | $parentFight = $parentGroup->fights->get(0); |
| 397 | 399 | |
| 398 | 400 | // determine whether c1 or c2 must be updated |
@@ -184,7 +184,9 @@ |
||
| 184 | 184 | return false; |
| 185 | 185 | } |
| 186 | 186 | foreach ($this->children as $child) { |
| 187 | - if (sizeof($child->fighters()) > 1) return false; |
|
| 187 | + if (sizeof($child->fighters()) > 1) { |
|
| 188 | + return false; |
|
| 189 | + } |
|
| 188 | 190 | } |
| 189 | 191 | return true; |
| 190 | 192 | |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Illuminate\Support\Facades\App; |
| 7 | 7 | use Xoco70\KendoTournaments\Models\Championship; |
| 8 | 8 | use Xoco70\KendoTournaments\Models\DirectEliminationFight; |
| 9 | -use Xoco70\KendoTournaments\Models\Fight; |
|
| 10 | 9 | |
| 11 | 10 | abstract class DirectEliminationTreeGen extends TreeGen |
| 12 | 11 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Illuminate\Support\Facades\App; |
| 7 | 7 | use Xoco70\KendoTournaments\Models\Championship; |
| 8 | 8 | use Xoco70\KendoTournaments\Models\DirectEliminationFight; |
| 9 | -use Xoco70\KendoTournaments\Models\Fight; |
|
| 10 | 9 | use Xoco70\KendoTournaments\Models\PreliminaryFight; |
| 11 | 10 | |
| 12 | 11 | abstract class PlayOffTreeGen extends TreeGen |