Test Setup Failed
Branch master (815d3e)
by Julien
20:01
created
app/Policies/FederationPolicy.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      * Create a new policy instance.
17 17
      * @param User $user
18 18
      * @param $ability
19
-     * @return bool
19
+     * @return boolean|null
20 20
      */
21 21
     public function before(User $user, $ability)
22 22
     {
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,16 +46,18 @@
 block discarded – undo
46 46
 
47 47
     public function edit(User $user, Federation $federation)
48 48
     {
49
-        if ($user->federationOwned == null)
50
-            return false;
49
+        if ($user->federationOwned == null) {
50
+                    return false;
51
+        }
51 52
 
52 53
         return $user->federationOwned->id == $federation->id;
53 54
     }
54 55
 
55 56
     public function update(User $user, Federation $federation)
56 57
     {
57
-        if ($user->federationOwned == null)
58
-            return false;
58
+        if ($user->federationOwned == null) {
59
+                    return false;
60
+        }
59 61
 
60 62
         return $user->federationOwned->id == $federation->id;
61 63
     }
Please login to merge, or discard this patch.
app/Policies/TeamPolicy.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      * Create a new policy instance.
15 15
      * @param User $user
16 16
      * @param $ability
17
-     * @return bool
17
+     * @return boolean|null
18 18
      */
19 19
     public function before(User $user, $ability)
20 20
     {
Please login to merge, or discard this patch.
app/Policies/TournamentPolicy.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      * Create a new policy instance.
17 17
      * @param User $user
18 18
      * @param $ability
19
-     * @return bool
19
+     * @return boolean|null
20 20
      */
21 21
     public function before(User $user, $ability)
22 22
     {
Please login to merge, or discard this patch.
app/Policies/UserPolicy.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * Create a new policy instance.
14 14
      * @param User $user
15 15
      * @param $ability
16
-     * @return bool
16
+     * @return boolean|null
17 17
      */
18 18
     public function before(User $user, $ability)
19 19
     {
Please login to merge, or discard this patch.
app/Repositories/Eloquent/UserRepository.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
 class UserRepository extends BaseRepository
9 9
 {
10 10
 
11
+    /**
12
+     * @param \Laravel\Socialite\Contracts\User $userData
13
+     */
11 14
     public function findByUserNameOrCreate($userData, $provider)
12 15
     {
13 16
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,10 +65,11 @@
 block discarded – undo
65 65
             $user->slug = str_slug($userData->name);
66 66
             $user->email = $userData->email;
67 67
             $user->firstname = $userData->name;
68
-            if (strlen($userData->nickname) != 0)
69
-                $user->name = $userData->nickname;
70
-            else
71
-                $user->name = $userData->email;
68
+            if (strlen($userData->nickname) != 0) {
69
+                            $user->name = $userData->nickname;
70
+            } else {
71
+                            $user->name = $userData->email;
72
+            }
72 73
             $user->save();
73 74
         }
74 75
     }
Please login to merge, or discard this patch.
app/Tournament.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Cviebrock\EloquentSluggable\Engines\KoreanEngine;
9 9
 use Cviebrock\EloquentSluggable\Sluggable;
10 10
 use Cviebrock\EloquentSluggable\SluggableScopeHelpers;
11
-use Illuminate\Database\Eloquent\Model;
12 11
 use Illuminate\Database\Eloquent\SoftDeletes;
13 12
 use OwenIt\Auditing\AuditingTrait;
14 13
 use Xoco70\LaravelTournaments\Models\ChampionshipSettings;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
     protected static function boot()
52 52
     {
53 53
         parent::boot();
54
-        static::deleting(function ($tournament) {
54
+        static::deleting(function($tournament) {
55 55
             $tournament->championships->each->delete();
56 56
             $tournament->invites->each->delete();
57 57
 
58 58
         });
59
-        static::restoring(function ($tournament) {
59
+        static::restoring(function($tournament) {
60 60
             $tournament->championships()->withTrashed()->get()->each->restore();
61 61
         });
62 62
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     public function buildCategoryList()
362 362
     {
363 363
         $championships = Championship::with('category', 'settings')
364
-            ->whereHas('category', function ($query) {
364
+            ->whereHas('category', function($query) {
365 365
                 return $query->where('isTeam', 1);
366 366
             })
367 367
             ->where('tournament_id', $this->id)
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,10 @@
 block discarded – undo
300 300
      */
301 301
     public function setAndConfigureCategories($ruleId)
302 302
     {
303
-        if ($ruleId == 0) return; // No Rules Selected
303
+        if ($ruleId == 0) {
304
+            return;
305
+        }
306
+        // No Rules Selected
304 307
 
305 308
         $options = $this->loadRulesOptions($ruleId);
306 309
 
Please login to merge, or discard this patch.
app/Association.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     {
82 82
         // Limit association to the same country
83 83
         if (!$user->isSuperAdmin()) {
84
-            $query->whereHas('federation', function ($query) use ($user) {
84
+            $query->whereHas('federation', function($query) use ($user) {
85 85
                 $query->where('country_id', $user->country_id);
86 86
             });
87 87
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,9 @@
 block discarded – undo
99 99
         if ($user->isFederationPresident() &&
100 100
             $user->federationOwned != null &&
101 101
             $this->federation->id == $user->federationOwned->id
102
-        )
103
-            return true;
102
+        ) {
103
+                    return true;
104
+        }
104 105
         return false;
105 106
     }
106 107
 
Please login to merge, or discard this patch.
app/TournamentLevel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     public static function getAllPlucked()
19 19
     {
20
-        return Cache::remember('level_pluck', config('constants.GRADE_MINUTES'), function () {
20
+        return Cache::remember('level_pluck', config('constants.GRADE_MINUTES'), function() {
21 21
             return static::pluck('name', 'id');
22 22
         });
23 23
     }
Please login to merge, or discard this patch.
app/Exceptions/InvitationNeededException.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
                 'quote' => trans('msg.invitation_needed'),
14 14
                 'author' => "Admin",
15 15
                 'source' => "",
16
-                'sentryID' => $this->sentryID,]
16
+                'sentryID' => $this->sentryID, ]
17 17
         );
18 18
     }
19 19
 }
Please login to merge, or discard this patch.