Passed
Branch winners (5ef91e)
by Julien
10:05
created
resources/views/partials/tree/singleElimination.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
             @foreach ($treeGen->brackets as $roundNumber => $round)
26 26
                 @foreach ($round as $matchNumber => $match)
27 27
                     <?php
28
-                    $isAWinner = (optional($match['playerA'])->id == $match['winner_id'] && $match['winner_id']!=null) ? 'X' : null;
29
-                    $isBWinner = (optional($match['playerB'])->id == $match['winner_id'] && $match['winner_id']!=null) ? 'X' : null;
28
+                    $isAWinner = (optional($match['playerA'])->id == $match['winner_id'] && $match['winner_id'] != null) ? 'X' : null;
29
+                    $isBWinner = (optional($match['playerB'])->id == $match['winner_id'] && $match['winner_id'] != null) ? 'X' : null;
30 30
                     ?>
31 31
                     <div class="match-wrapper"
32 32
                          style="top:  {{ $match['matchWrapperTop'] }}px; left:  {{ $match['matchWrapperLeft']  }}px; width: {{   $treeGen->matchWrapperWidth  }}px;">
Please login to merge, or discard this patch.
src/TreeController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,14 +124,14 @@
 block discarded – undo
124 124
                 // Find the fight in array, and update order
125 125
                 $fight->c1 = $fighters[$numFighter];
126 126
                 $scores[$numFighter] != null
127
-                    ?  $fight->winner_id = $fighters[$numFighter]
127
+                    ? $fight->winner_id = $fighters[$numFighter]
128 128
                     : $fight->winner_id = null;
129 129
                 $numFighter++;
130 130
 
131 131
                 $fight->c2 = $fighters[$numFighter];
132
-                if ($fight->winner_id == null){
132
+                if ($fight->winner_id == null) {
133 133
                     $scores[$numFighter] != null
134
-                        ?  $fight->winner_id = $fighters[$numFighter]
134
+                        ? $fight->winner_id = $fighters[$numFighter]
135 135
                         : $fight->winner_id = null;
136 136
                 }
137 137
 
Please login to merge, or discard this patch.
src/TreeGen/CreateSingleEliminationTree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $this->groupsByRound = $groupsByRound;
27 27
         $this->hasPreliminary = $hasPreliminary;
28 28
 
29
-        $this->firstRoundName = $groupsByRound->first()->map(function ($item) use ($championship) {
29
+        $this->firstRoundName = $groupsByRound->first()->map(function($item) use ($championship) {
30 30
             $fighters = $item->getFightersWithBye();
31 31
             $fighter1 = $fighters->get(0);
32 32
             $fighter2 = $fighters->get(1);
Please login to merge, or discard this patch.