Code Duplication    Length = 10-10 lines in 2 locations

Validator.php 2 locations

@@ 251-260 (lines=10) @@
248
     *
249
     * @return self
250
     */
251
    public function addError($param, $message, $group = null)
252
    {
253
        if (null !== $group) {
254
            $this->errors[$group][$param][] = $message;
255
        } else {
256
            $this->errors[$param][] = $message;
257
        }
258
259
        return $this;
260
    }
261
262
    /**
263
     * Gets all default messages.
@@ 445-454 (lines=10) @@
442
     *
443
     * @return self
444
     */
445
    public function setParamErrors($param, array $errors, $group = null)
446
    {
447
        if (null !== $group) {
448
            $this->errors[$group][$param] = $errors;
449
        } else {
450
            $this->errors[$param] = $errors;
451
        }
452
453
        return $this;
454
    }
455
456
    /**
457
     * Sets the value of a request parameter.