| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | trait ShopItemPresenter |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The default banner used when there is no banner for the item. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected string $defaultIcon = '/images/shop/default_icon.svg'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Get the icon. |
||
| 16 | * |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | public function getItemIconAttribute(): string |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Parse a media and return it if isset or return the default banner. |
||
| 26 | * |
||
| 27 | * @param string $type The type of the media to get. |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | protected function parseMedia(string $type): string |
||
| 40 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.