Test Failed
Push — master ( 2dcdef...5f4570 )
by Julien
03:01
created
src/models/Fight.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -152,6 +152,9 @@
 block discarded – undo
152 152
 //        }
153 153
 //    }
154 154
 
155
+    /**
156
+     * @param Collection $rounds
157
+     */
155 158
     public static function saveRoundRobinFights(Championship $championship, $rounds)
156 159
     {
157 160
 
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,7 @@
 block discarded – undo
4 4
 namespace Xoco70\KendoTournaments\Models;
5 5
 
6 6
 
7
-use App\User;
8 7
 use Illuminate\Database\Eloquent\Model;
9
-use Illuminate\Support\Collection;
10 8
 
11 9
 class Fight extends Model
12 10
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
 
161 161
             $fighters = self::getActorsToFights($championship, $round2);
162 162
 
163
-            $away = $fighters->splice(sizeof($fighters) / 2);  // 2
163
+            $away = $fighters->splice(sizeof($fighters) / 2); // 2
164 164
 
165 165
             $home = $fighters; // 1
166 166
 
Please login to merge, or discard this patch.
src/models/Round.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
     /**
64 64
      * @param Collection $rounds
65
-     * @param $settings
65
+     * @param ChampionshipSettings $settings
66 66
      * @param Championship $championship
67 67
      */
68 68
     public static function generateFights(Collection $rounds, $settings, Championship $championship = null)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
         // Delete previous fight for this championship
72 72
 
73
-        $arrRoundsId = $rounds->map(function ($value, $key) {
73
+        $arrRoundsId = $rounds->map(function($value, $key) {
74 74
             return $value->id;
75 75
         })->toArray();
76 76
         Fight::destroy($arrRoundsId);
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
     public $championship, $settings;
20 20
 
21 21
 
22
+    /**
23
+     * @param \Xoco70\KendoTournaments\Models\ChampionshipSettings $settings
24
+     */
22 25
     public function __construct(Championship $championship, $groupBy, $settings)
23 26
     {
24 27
         $this->championship = $championship;
@@ -242,7 +245,7 @@  discard block
 block discarded – undo
242 245
 
243 246
     /**
244 247
      * @param $fighterGroups
245
-     * @param $max
248
+     * @param integer $max
246 249
      * @return Collection
247 250
      */
248 251
     private function repart($fighterGroups, $max)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     $round->teams()->sync($fighters);
106 106
                 } else {
107 107
                     $round->competitors()->detach();
108
-                    foreach ($fighters as $fighter){
108
+                    foreach ($fighters as $fighter) {
109 109
                         $round->competitors()->attach($fighter);
110 110
                     }
111 111
 //                    $round->competitors()->sync($fighters);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     private function getTreeSize($fighterCount, $groupSize)
209 209
     {
210 210
         $square = collect([1, 2, 4, 8, 16, 32, 64]);
211
-        $squareMultiplied = $square->map(function ($item, $key) use ($groupSize) {
211
+        $squareMultiplied = $square->map(function($item, $key) use ($groupSize) {
212 212
             return $item * $groupSize;
213 213
         });
214 214
 
Please login to merge, or discard this patch.
database/migrations/2017_02_12_000428_create_Round_Competitor_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('round_competitor', function (Blueprint $table) {
16
+        Schema::create('round_competitor', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('competitor_id')->unsigned()->nullable()->index();
19 19
             $table->integer('round_id')->unsigned()->index(); // A checar
Please login to merge, or discard this patch.
database/migrations/2017_02_12_000437_create_Round_Team_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('round_team', function (Blueprint $table) {
16
+        Schema::create('round_team', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('team_id')->unsigned()->nullable()->index();
19 19
             $table->integer('round_id')->unsigned()->index(); // A checar
Please login to merge, or discard this patch.
src/models/Team.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     public function rounds()
33 33
     {
34
-        return $this->belongsToMany(Round::class,'round_team');
34
+        return $this->belongsToMany(Round::class, 'round_team');
35 35
     }
36 36
 
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
src/models/Competitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
     public function rounds()
78 78
     {
79
-        return $this->belongsToMany(Round::class,'round_competitor');
79
+        return $this->belongsToMany(Round::class, 'round_competitor');
80 80
     }
81 81
 
82 82
 }
Please login to merge, or discard this patch.
src/TreeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             'championshipSettings'
48 48
             )->first();
49 49
 
50
-        $championship = Championship::with('teams','users','category','settings')->find($championship->id);
50
+        $championship = Championship::with('teams', 'users', 'category', 'settings')->find($championship->id);
51 51
 
52 52
         $settings = ChampionshipSettings::createOrUpdate($request, $championship);
53 53
 
Please login to merge, or discard this patch.