| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function delete(User $user, User $userModel) |
||
| 46 | { |
||
| 47 | if ($user->isFederationPresident()) { |
||
| 48 | return $user->federationOwned->id == $userModel->federation_id; |
||
| 49 | } |
||
| 50 | |||
| 51 | if ($user->isAssociationPresident()) { |
||
| 52 | return $user->associationOwned->id == $userModel->association_id; |
||
| 53 | } |
||
| 54 | if ($user->isClubPresident()) { |
||
| 55 | return $user->clubOwned->id == $userModel->club_id; |
||
| 56 | } |
||
| 57 | return false; |
||
| 58 | } |
||
| 77 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.