Code Duplication    Length = 12-12 lines in 4 locations

src/Column/Action.php 4 locations

@@ 136-147 (lines=12) @@
133
	 * @param string|callable $title
134
	 * @return static
135
	 */
136
	public function setTitle($title)
137
	{
138
		if (!is_string($title) && !is_callable($title) && !is_null($title)) {
139
			throw new DataGridException(
140
				'Action title has to be either string or callback, that will return string'
141
			);
142
		}
143
144
		$this->title = $title;
145
146
		return $this;
147
	}
148
149
150
	/**
@@ 179-190 (lines=12) @@
176
	 * @param string|callable $class
177
	 * @return static
178
	 */
179
	public function setClass($class)
180
	{
181
		if (!is_string($class) && !is_callable($class) && !is_null($class)) {
182
			throw new DataGridException(
183
				'Action class has to be either string or callback, that will return string'
184
			);
185
		}
186
187
		$this->class = $class;
188
189
		return $this;
190
	}
191
192
193
	/**
@@ 222-233 (lines=12) @@
219
	 * @param string|callable $icon
220
	 * @return static|callable
221
	 */
222
	public function setIcon($icon)
223
	{
224
		if (!is_string($icon) && !is_callable($icon) && !is_null($icon)) {
225
			throw new DataGridException(
226
				'Action icon has to be either string or callback, that will return string'
227
			);
228
		}
229
230
		$this->icon = $icon;
231
232
		return $this;
233
	}
234
235
236
	/**
@@ 266-277 (lines=12) @@
263
	 * @param string $column
264
	 * @return static
265
	 */
266
	public function setConfirm($message, $column = NULL)
267
	{
268
		if (!is_string($message) && !is_callable($message) && !is_null($message)) {
269
			throw new DataGridException(
270
				'Action message has to be either string or callback, that will return string'
271
			);
272
		}
273
274
		$this->confirm = [$message, $column];
275
276
		return $this;
277
	}
278
279
280
	/**