| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait FlashTrait |
||
| 13 | { |
||
| 14 | protected FlashBag $flashBag; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Add a flash message. |
||
| 18 | * |
||
| 19 | * @param string $type flash type, eg. 'error', 'notice' or 'success' |
||
| 20 | * @param string $message flash message |
||
| 21 | * @param string $contentType mime, eg 'text/plain' or 'text/html' |
||
| 22 | */ |
||
| 23 | 1 | public function flash(string $type, string $message, string $contentType = 'text/plain'): void |
|
| 26 | 1 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Get the bag with flash messages. |
||
| 30 | */ |
||
| 31 | 2 | public function flashes(): FlashBag |
|
| 40 |