| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 31 | public function transformData($model) |
||
| 32 | { |
||
| 33 | $data = $model->toArray(); |
||
| 34 | $data['links'] = [ |
||
| 35 | 'details_web_view' => route('topic.web_view', $model->id), |
||
| 36 | 'replies_web_view' => route('replies.web_view', $model->id), |
||
| 37 | 'web_url' => trim(config('app.url'), '/').'/topics/'.$model->id, |
||
| 38 | ]; |
||
| 39 | |||
| 40 | return $data; |
||
| 41 | } |
||
| 42 | |||
| 63 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: