| Total Complexity | 3 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class SkillDeclarationBelongsToUserRule implements Rule |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * This check passes if the $user has ownership of this skill declaration with id=$value |
||
| 16 | * @param [type] $attribute [description] |
||
| 17 | * @param [type] $value [description] |
||
| 18 | * @return [type] [description] |
||
| 19 | */ |
||
| 20 | public function passes($attribute, $value) |
||
| 21 | { |
||
| 22 | return SkillDeclaration::find($value) && |
||
| 23 | SkillDeclaration::find($value)->applicant->user->id == Auth::user()->id; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function message() |
||
| 29 | } |
||
| 30 | } |
||
| 31 |