| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function transform(Firm $firm): array |
||
| 15 | { |
||
| 16 | $data = array_except($firm->toArray(), ['benefits']); |
||
| 17 | |||
| 18 | return array_merge($data, [ |
||
| 19 | 'thumbnail' => $firm->logo->getFilename() ? (string) $firm->logo->url() : cdn('img/logo-gray.png'), |
||
| 20 | 'logo' => $firm->getOriginal('logo'), |
||
| 21 | 'benefits' => $firm->benefits->pluck('name')->toArray() |
||
|
|
|||
| 22 | ]); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.