| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait AddFlashTrait{ |
||
| 8 | |||
| 9 | private $flashBag; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Adding te flash message to the session. This enables to have the same syntax as in the controllers |
||
| 13 | * @param string $type |
||
| 14 | * @param string $message |
||
| 15 | */ |
||
| 16 | public function addFlashMessage(string $type, string $message) |
||
| 17 | { |
||
| 18 | $this->flashBag->add($type, $message); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @required |
||
| 23 | * @param FlashBagInterface $flashBag |
||
| 24 | */ |
||
| 25 | public function setFlashBag(FlashBagInterface $flashBag): void |
||
| 28 | } |
||
| 29 | |||
| 30 | } |