Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | trait FlashTrait |
||
13 | { |
||
14 | protected FlashBag $flashes; |
||
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 | public function flash(string $type, string $message, string $contentType = 'text/plain'): void |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Get the bag with flash messages. |
||
30 | * |
||
31 | * @return FlashBag |
||
32 | */ |
||
33 | public function flashes(): FlashBag |
||
42 |