Code Duplication    Length = 8-8 lines in 2 locations

src/Core/ViewHelper/AbstractViewHelper.php 2 locations

@@ 259-266 (lines=8) @@
256
     * @throws Exception
257
     * @api
258
     */
259
    protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null)
260
    {
261
        if (array_key_exists($name, $this->argumentDefinitions)) {
262
            throw new Exception(
263
                'Argument "' . $name . '" has already been defined, thus it should not be defined again.',
264
                1253036401
265
            );
266
        }
267
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
268
        return $this;
269
    }
@@ 285-292 (lines=8) @@
282
     * @throws Exception
283
     * @api
284
     */
285
    protected function overrideArgument($name, $type, $description, $required = false, $defaultValue = null)
286
    {
287
        if (!array_key_exists($name, $this->argumentDefinitions)) {
288
            throw new Exception(
289
                'Argument "' . $name . '" has not been defined, thus it can\'t be overridden.',
290
                1279212461
291
            );
292
        }
293
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
294
        return $this;
295
    }