Code Duplication    Length = 18-18 lines in 2 locations

view/SSTemplateParser.php 1 location

@@ 180-197 (lines=18) @@
177
	 * @param $type
178
	 * @throws InvalidArgumentException
179
	 */
180
	protected function validateExtensionBlock($name, $callable, $type) {
181
		if (!is_string($name)) {
182
			throw new InvalidArgumentException(
183
				sprintf(
184
					"Name argument for %s must be a string",
185
					$type
186
				)
187
			);
188
		} elseif (!is_callable($callable)) {
189
			throw new InvalidArgumentException(
190
				sprintf(
191
					"Callable %s argument named '%s' is not callable",
192
					$type,
193
					$name
194
				)
195
			);
196
		}
197
	}
198
199
	/* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock |
200
	OpenBlock | MalformedBlock | Injection | Text)+ */

view/SSTemplateParser.php.inc 1 location

@@ 201-218 (lines=18) @@
198
	 * @param $type
199
	 * @throws InvalidArgumentException
200
	 */
201
	protected function validateExtensionBlock($name, $callable, $type) {
202
		if (!is_string($name)) {
203
			throw new InvalidArgumentException(
204
				sprintf(
205
					"Name argument for %s must be a string",
206
					$type
207
				)
208
			);
209
		} elseif (!is_callable($callable)) {
210
			throw new InvalidArgumentException(
211
				sprintf(
212
					"Callable %s argument named '%s' is not callable",
213
					$type,
214
					$name
215
				)
216
			);
217
		}
218
	}
219
220
	/*!* SSTemplateParser
221