| Total Complexity | 7 | 
| Total Lines | 45 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 9 | class TeamPolicy  | 
            ||
| 10 | { | 
            ||
| 11 | use HandlesAuthorization;  | 
            ||
| 12 | |||
| 13 | /**  | 
            ||
| 14 | * Create a new policy instance.  | 
            ||
| 15 | * @param User $user  | 
            ||
| 16 | * @param $ability  | 
            ||
| 17 | * @return bool  | 
            ||
| 18 | */  | 
            ||
| 19 | public function before(User $user, $ability)  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 20 |     { | 
            ||
| 21 |         if ($user->isSuperAdmin()) { | 
            ||
| 22 | return true;  | 
            ||
| 23 | }  | 
            ||
| 24 | return null;  | 
            ||
| 25 | }  | 
            ||
| 26 | |||
| 27 | // You can create a user if you are not a simple user  | 
            ||
| 28 | public function create(User $user, Tournament $tournament)  | 
            ||
| 31 | }  | 
            ||
| 32 | |||
| 33 | |||
| 34 | public function edit(User $user, Tournament $tournament)  | 
            ||
| 35 |     { | 
            ||
| 36 | return $user->isOwner($tournament);  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | |||
| 40 | // You can store a user if you are not a simple user  | 
            ||
| 41 | public function store(User $user, Tournament $tournament)  | 
            ||
| 42 |     { | 
            ||
| 43 | return $user->isOwner($tournament);  | 
            ||
| 44 | }  | 
            ||
| 45 | |||
| 46 | public function update(User $user, Tournament $tournament)  | 
            ||
| 47 |     { | 
            ||
| 48 | return $user->isOwner($tournament);  | 
            ||
| 49 | }  | 
            ||
| 50 | |||
| 51 | public function delete(User $user, \Xoco70\LaravelTournaments\Models\Tournament $tournament)  | 
            ||
| 54 | }  | 
            ||
| 55 | |||
| 56 | }  | 
            ||
| 57 | 
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.