| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ViewFlashMessageRenderer implements FlashMessageRendererContract |
||
| 10 | { |
||
| 11 | protected $viewFactory; |
||
| 12 | |||
| 13 | protected $configRepository; |
||
| 14 | |||
| 15 | protected $skin; |
||
| 16 | |||
| 17 | public function __construct(ViewFactory $viewFactory, ConfigRepository $configRepository) |
||
| 18 | { |
||
| 19 | $this->viewFactory = $viewFactory; |
||
| 20 | |||
| 21 | $this->configRepository = $configRepository; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function setSkin(string $skin) |
||
| 25 | { |
||
| 26 | $this->skin = $skin; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getSkin() |
||
| 30 | { |
||
| 31 | return $this->skin ?? $this->configRepository->get('laraflash.skin'); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function render(FlashMessage $flashMessage): string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |