Code Duplication    Length = 8-8 lines in 2 locations

src/Core/ViewHelper/AbstractViewHelper.php 2 locations

@@ 166-173 (lines=8) @@
163
     * @throws Exception
164
     * @api
165
     */
166
    protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null)
167
    {
168
        if (array_key_exists($name, $this->argumentDefinitions)) {
169
            throw new Exception('Argument "' . $name . '" has already been defined, thus it should not be defined again.', 1253036401);
170
        }
171
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
172
        return $this;
173
    }
174
175
    /**
176
     * Register a new argument. Call this method from your ViewHelper subclass
@@ 208-215 (lines=8) @@
205
     * @throws Exception
206
     * @api
207
     */
208
    protected function overrideArgument($name, $type, $description, $required = false, $defaultValue = null)
209
    {
210
        if (!array_key_exists($name, $this->argumentDefinitions)) {
211
            throw new Exception('Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', 1279212461);
212
        }
213
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
214
        return $this;
215
    }
216
217
    /**
218
     * Sets all needed attributes needed for the rendering. Called by the