| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function authorize() |
||
| 17 | { |
||
| 18 | // originalParameter avoids type hinting that automagically transforms the id into the RatingGuideAnswer object |
||
|
1 ignored issue
–
show
|
|||
| 19 | //$answer = RatingGuideAnswer::find($this->route()->originalParameter('ratingGuideAnswer')); |
||
| 20 | |||
| 21 | // The id parameter in the route is typehinted to magically become a RatingGuideAnswer object. |
||
| 22 | $answer = $this->route('ratingGuideAnswer'); |
||
| 23 | return $answer && $this->user()->can('update', $answer); |
||
| 24 | } |
||
| 41 |