Code Duplication    Length = 8-8 lines in 2 locations

src/Core/ViewHelper/AbstractViewHelper.php 2 locations

@@ 147-154 (lines=8) @@
144
     * @throws Exception
145
     * @api
146
     */
147
    protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null)
148
    {
149
        if (array_key_exists($name, $this->argumentDefinitions)) {
150
            throw new Exception(
151
                'Argument "' . $name . '" has already been defined, thus it should not be defined again.',
152
                1253036401
153
            );
154
        }
155
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
156
        return $this;
157
    }
@@ 173-180 (lines=8) @@
170
     * @throws Exception
171
     * @api
172
     */
173
    protected function overrideArgument($name, $type, $description, $required = false, $defaultValue = null)
174
    {
175
        if (!array_key_exists($name, $this->argumentDefinitions)) {
176
            throw new Exception(
177
                'Argument "' . $name . '" has not been defined, thus it can\'t be overridden.',
178
                1279212461
179
            );
180
        }
181
        $this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue);
182
        return $this;
183
    }