| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function authorize() |
||
| 19 | { |
||
| 20 | $experience_type = $this->input('experience_type'); |
||
| 21 | $experience_id = (int)$this->input('experience_id'); |
||
| 22 | $experience = new Experience(); |
||
| 23 | $experienceInstance = $experience->getExperienceInstance($experience_type, $experience_id); |
||
| 24 | $user = $this->user(); |
||
| 25 | |||
| 26 | return $experienceInstance !== null |
||
| 27 | && $user !== null |
||
| 28 | && $user->can('create', ExperienceSkill::class) |
||
| 29 | && $user->can('update', $experienceInstance); |
||
| 30 | } |
||
| 56 |