File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,21 @@ class MessageManager
2020 *
2121 * @var array
2222 */
23- protected $ receivers = array () ;
23+ protected $ receivers = [] ;
2424
2525 /**
2626 * Holds messages to send.
2727 *
2828 * @var array
2929 */
30- protected $ messages = array () ;
30+ protected $ messages = [] ;
3131
3232 /**
3333 * Holds custom variables to inject en message processed
3434 *
3535 * @var array
3636 */
37- protected $ injected = array () ;
37+ protected $ injected = [] ;
3838
3939 /**
4040 * Constructor
@@ -373,4 +373,15 @@ public function transformMessages(array $messages)
373373
374374 return $ transformed ;
375375 }
376+
377+ /**
378+ * Reset messages and target array to avoid send multiple times previous messages
379+ * @return void
380+ */
381+ public function clear ()
382+ {
383+ $ this ->receivers = [];
384+ $ this ->messages = [];
385+ $ this ->injected = [];
386+ }
376387}
You can’t perform that action at this time.
0 commit comments