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