Test Failed
Push — master ( 0463aa...316b3e )
by Julien
11:52
created
src/models/FightersGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
         // Delete previous fight for this championship
73 73
 
74
-        $arrGroupsId = $fightersGroup->map(function ($value, $key) {
74
+        $arrGroupsId = $fightersGroup->map(function($value, $key) {
75 75
             return $value->id;
76 76
         })->toArray();
77 77
         Fight::destroy($arrGroupsId);
Please login to merge, or discard this patch.
src/TreeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,11 +77,11 @@
 block discarded – undo
77 77
             FightersGroup::generateFights($groups, $settings, $championship);
78 78
         } catch (TreeGenerationException $e) {
79 79
             redirect()->back()
80
-                ->withErrors([$numFighters ."-".$e->getMessage()]);
80
+                ->withErrors([$numFighters . "-" . $e->getMessage()]);
81 81
         }
82 82
 
83 83
         return redirect()->back()
84 84
             ->with('numFighters', $numFighters)
85
-            ->with(['success' , "Success"]);
85
+            ->with(['success', "Success"]);
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
resources/views/partials/tree/directElimination.blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 use Xoco70\KendoTournaments\TreeGen\DirectEliminationTreeGen;
3 3
 
4
-$directEliminationTree = $championship->fightersGroups->map(function ($item, $key) use ($championship) {
5
-    if ($championship->category->isTeam()){
4
+$directEliminationTree = $championship->fightersGroups->map(function($item, $key) use ($championship) {
5
+    if ($championship->category->isTeam()) {
6 6
 
7 7
         $fighter1 = $item->team1 != null ? $item->team1->name : "Bye";
8 8
         $fighter2 = $item->team2 != null ? $item->team2->name : "Bye";
9
-    }else{
9
+    } else {
10 10
         $fighter1 = $item->competitors->get(0) != null ? $item->competitors->get(0)->user->name : "Bye";
11 11
         $fighter2 = $item->competitors->get(1) != null ? $item->competitors->get(1)->user->name : "Bye";
12 12
     }
Please login to merge, or discard this patch.
database/migrations/2016_10_24_223706_create_FightersGroup_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('fighters_groups', function (Blueprint $table) {
16
+        Schema::create('fighters_groups', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('championship_id')->unsigned()->index();
19 19
             $table->tinyInteger('round')->default(0); // Eliminitory, 1/8, 1/4, etc.
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $round = 1;
56 56
         $winnersPerGroup = $this->settings->preliminaryWinner;
57 57
         // loop on areas
58
-        $tree = $this->generateGroupsForFirstRound($usersByArea, $area, $round );
58
+        $tree = $this->generateGroupsForFirstRound($usersByArea, $area, $round);
59 59
         $round++;
60 60
 
61 61
         $numGroups = sizeof($tree);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     private function getTreeSize($fighterCount, $groupSize)
158 158
     {
159 159
         $square = collect([1, 2, 4, 8, 16, 32, 64]);
160
-        $squareMultiplied = $square->map(function ($item, $key) use ($groupSize) {
160
+        $squareMultiplied = $square->map(function($item, $key) use ($groupSize) {
161 161
             return $item * $groupSize;
162 162
         });
163 163
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      * @param $round
294 294
      * @return FightersGroup
295 295
      */
296
-    public function saveGroup($area, $fighters, $order,$round)
296
+    public function saveGroup($area, $fighters, $order, $round)
297 297
     {
298 298
         $fighters = $fighters->pluck('id')->shuffle();
299 299
 
Please login to merge, or discard this patch.