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