| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 17 | public function assets(string $type = '', ?string $locale = null): Collection |
|
| 44 | { |
||
| 45 | 17 | $assets = $this->assetRelation; |
|
| 46 | |||
| 47 | 17 | if ($type) { |
|
| 48 | 16 | $assets = $assets->where('pivot.type', $type); |
|
| 49 | } |
||
| 50 | |||
| 51 | 17 | if ($locale) { |
|
| 52 | 1 | $assets = $assets->where('pivot.locale', $locale); |
|
| 53 | } |
||
| 54 | |||
| 55 | 17 | return $assets->sortBy('pivot.order'); |
|
| 56 | } |
||
| 58 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.