Code Duplication    Length = 8-8 lines in 5 locations

src/scenarios/validation/validator/NumberValidator.php 2 locations

@@ 15-22 (lines=8) @@
12
13
    protected $max = null;
14
15
    public function setMin($min) : self
16
    {
17
        if (\intval($min) <= 0) {
18
            throw new \InvalidArgumentException('Invalid min param value');
19
        }
20
        $this->min = (int)$min;
21
        return $this;
22
    }
23
24
    public function setMax($max) : self
25
    {
@@ 24-31 (lines=8) @@
21
        return $this;
22
    }
23
24
    public function setMax($max) : self
25
    {
26
        if (\intval($max) <= 0) {
27
            throw new \InvalidArgumentException('Invalid max param value');
28
        }
29
        $this->max = (int)$max;
30
        return $this;
31
    }
32
33
    protected function normalizeNumber($value) : string
34
    {

src/scenarios/validation/validator/StringValidator.php 3 locations

@@ 17-24 (lines=8) @@
14
15
    protected $message = 'Value must be a string';
16
17
    public function setMin($min) : self
18
    {
19
        if (\intval($min) <= 0) {
20
            throw new \InvalidArgumentException('Invalid min param value');
21
        }
22
        $this->min = (int)$min;
23
        return $this;
24
    }
25
26
    public function setMax($max) : self
27
    {
@@ 26-33 (lines=8) @@
23
        return $this;
24
    }
25
26
    public function setMax($max) : self
27
    {
28
        if (\intval($max) <= 0) {
29
            throw new \InvalidArgumentException('Invalid max param value');
30
        }
31
        $this->max = (int)$max;
32
        return $this;
33
    }
34
35
    public function setLength($length) : self
36
    {
@@ 35-42 (lines=8) @@
32
        return $this;
33
    }
34
35
    public function setLength($length) : self
36
    {
37
        if (\intval($length) <= 0) {
38
            throw new \InvalidArgumentException('Invalid length param value');
39
        }
40
        $this->length = (int)$length;
41
        return $this;
42
    }
43
44
    public function setEncoding($encoding)
45
    {