@@ 37-42 (lines=6) @@ | ||
34 | { |
|
35 | if ($championship->category->isTeam) { |
|
36 | $fighters = $group->teams; |
|
37 | if (sizeof($fighters) == 0){ |
|
38 | $fighters->push(new Team()); |
|
39 | $fighters->push(new Team()); |
|
40 | } else if (count($fighters) % 2 != 0) { |
|
41 | $fighters->push(new Team(['name' => 'BYE'])); |
|
42 | } |
|
43 | ||
44 | } else { |
|
45 | $fighters = $group->competitors; |
|
@@ 46-51 (lines=6) @@ | ||
43 | ||
44 | } else { |
|
45 | $fighters = $group->competitors; |
|
46 | if (sizeof($fighters) == 0){ // If |
|
47 | $fighters->push(new Competitor()); |
|
48 | $fighters->push(new Competitor()); |
|
49 | }else if (count($fighters) % 2 != 0) { // If fighter is not pair, add a BYE |
|
50 | $fighters->push(new Competitor()); |
|
51 | } |
|
52 | ||
53 | ||
54 | } |