@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public static function boot() |
70 | 70 | { |
71 | 71 | parent::boot(); |
72 | - static::creating(function ($user) { |
|
72 | + static::creating(function($user) { |
|
73 | 73 | $softDeletedUser = User::onlyTrashed()->where('email', '=', $user->email)->first(); |
74 | 74 | if ($softDeletedUser != null) { |
75 | 75 | $softDeletedUser->restore(); |
@@ -85,12 +85,12 @@ discard block |
||
85 | 85 | // If a User is deleted, you must delete: |
86 | 86 | // His tournaments, his competitors |
87 | 87 | |
88 | - static::deleting(function ($user) { |
|
88 | + static::deleting(function($user) { |
|
89 | 89 | $user->tournaments->each->delete(); |
90 | 90 | $user->competitors->each->delete(); |
91 | 91 | |
92 | 92 | }); |
93 | - static::restoring(function ($user) { |
|
93 | + static::restoring(function($user) { |
|
94 | 94 | $user->competitors()->withTrashed()->get()->each->restore(); |
95 | 95 | $user->tournaments()->withTrashed()->get()->each->restore(); |
96 | 96 | }); |
@@ -114,7 +114,7 @@ |
||
114 | 114 | return $query->where('federation_id', $user->federationOwned->id); |
115 | 115 | case |
116 | 116 | $user->isAssociationPresident() && $user->associationOwned: |
117 | - return $query->whereHas('association', function ($query) use ($user) { |
|
117 | + return $query->whereHas('association', function($query) use ($user) { |
|
118 | 118 | $query->where('id', $user->associationOwned->id); |
119 | 119 | }); |
120 | 120 | case $user->isClubPresident() && $user->clubOwned: |
@@ -82,10 +82,12 @@ |
||
82 | 82 | */ |
83 | 83 | public function federation() |
84 | 84 | { |
85 | - if ($this->association != null) |
|
86 | - return $this->association->federation(); |
|
87 | - else |
|
88 | - return $this->association(); //TODO THIS IS BAD :( |
|
85 | + if ($this->association != null) { |
|
86 | + return $this->association->federation(); |
|
87 | + } else { |
|
88 | + return $this->association(); |
|
89 | + } |
|
90 | + //TODO THIS IS BAD :( |
|
89 | 91 | } |
90 | 92 | |
91 | 93 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * Get the notification's delivery channels. |
28 | 28 | * |
29 | 29 | * @param mixed $notifiable |
30 | - * @return array |
|
30 | + * @return string[] |
|
31 | 31 | */ |
32 | 32 | public function via($notifiable) |
33 | 33 | { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * Get the notification's delivery channels. |
28 | 28 | * |
29 | 29 | * @param mixed $notifiable |
30 | - * @return array |
|
30 | + * @return string[] |
|
31 | 31 | */ |
32 | 32 | public function via($notifiable) |
33 | 33 | { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * Get the notification's delivery channels. |
28 | 28 | * |
29 | 29 | * @param mixed $notifiable |
30 | - * @return array |
|
30 | + * @return string[] |
|
31 | 31 | */ |
32 | 32 | public function via($notifiable) |
33 | 33 | { |
@@ -16,7 +16,7 @@ |
||
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 | { |
@@ -16,7 +16,7 @@ |
||
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 | { |
@@ -16,7 +16,7 @@ |
||
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 | { |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Illuminate\Support\Facades\App; |
9 | 9 | use Illuminate\Support\Facades\Auth; |
10 | 10 | use Illuminate\Support\Facades\Response; |
11 | -use Illuminate\Support\Facades\View; |
|
12 | 11 | use Xoco70\LaravelTournaments\Models\ChampionshipSettings; |
13 | 12 | |
14 | 13 | class ChampionshipSettingsController extends Controller |