Code Duplication    Length = 7-7 lines in 4 locations

src/IPub/FlashMessages/FlashNotifier.php 4 locations

@@ 81-87 (lines=7) @@
78
	 *
79
	 * @return Entities\IMessage
80
	 */
81
	public function success($message, $title = NULL) : Entities\IMessage
82
	{
83
		$args = func_get_args();
84
		array_splice($args, 1, 0, [Entities\IMessage::LEVEL_SUCCESS]);
85
86
		return call_user_func_array([$this, 'setMessage'], $args);
87
	}
88
89
	/**
90
	 * Flash an information message
@@ 97-103 (lines=7) @@
94
	 *
95
	 * @return Entities\IMessage
96
	 */
97
	public function info($message, $title = NULL) : Entities\IMessage
98
	{
99
		$args = func_get_args();
100
		array_splice($args, 1, 0, [Entities\IMessage::LEVEL_INFO]);
101
102
		return call_user_func_array([$this, 'setMessage'], $args);
103
	}
104
105
	/**
106
	 * Flash a warning message
@@ 113-119 (lines=7) @@
110
	 *
111
	 * @return Entities\IMessage
112
	 */
113
	public function warning($message, $title = NULL) : Entities\IMessage
114
	{
115
		$args = func_get_args();
116
		array_splice($args, 1, 0, [Entities\IMessage::LEVEL_WARNING]);
117
118
		return call_user_func_array([$this, 'setMessage'], $args);
119
	}
120
121
	/**
122
	 * Flash an error message
@@ 129-135 (lines=7) @@
126
	 *
127
	 * @return Entities\IMessage
128
	 */
129
	public function error($message, $title = NULL) : Entities\IMessage
130
	{
131
		$args = func_get_args();
132
		array_splice($args, 1, 0, [Entities\IMessage::LEVEL_ERROR]);
133
134
		return call_user_func_array([$this, 'setMessage'], $args);
135
	}
136
137
	/**
138
	 * Add an "important" flash to the session