Code Duplication    Length = 3-5 lines in 2 locations

Validator.php 2 locations

@@ 379-381 (lines=3) @@
376
    {
377
        if (null !== $group) {
378
            if (null !== $key) {
379
                if (isset($this->errors[$group][$key])) {
380
                    $this->errors[$group][$key] = [];
381
                }
382
            } elseif (isset($this->errors[$group])) {
383
                $this->errors[$group] = [];
384
            }
@@ 385-389 (lines=5) @@
382
            } elseif (isset($this->errors[$group])) {
383
                $this->errors[$group] = [];
384
            }
385
        } elseif (null !== $key) {
386
            if (isset($this->errors[$key])) {
387
                $this->errors[$key] = [];
388
            }
389
        }
390
391
        return $this;
392
    }