Code Duplication    Length = 10-10 lines in 2 locations

Validator.php 2 locations

@@ 467-476 (lines=10) @@
464
     *
465
     * @return self
466
     */
467
    public function setValue(string $key, $value, string $group = null): self
468
    {
469
        if (!empty($group)) {
470
            $this->values[$group][$key] = $value;
471
        } else {
472
            $this->values[$key] = $value;
473
        }
474
475
        return $this;
476
    }
477
478
    /**
479
     * Sets values of validated data.
@@ 486-495 (lines=10) @@
483
     *
484
     * @return self
485
     */
486
    public function setValues(array $values, string $group = null): self
487
    {
488
        if (!empty($group)) {
489
            $this->values[$group] = $values;
490
        } else {
491
            $this->values = $values;
492
        }
493
494
        return $this;
495
    }
496
497
    /**
498
     * Gets the value of a property of an object.