Code Duplication    Length = 10-10 lines in 2 locations

src/SimpleTypeBase.php 2 locations

@@ 132-141 (lines=10) @@
129
        $this->isValid($v);
130
    }
131
132
    private function checkMinLength($v)
133
    {
134
        $stringLen = strlen($v);
135
        if ($this->minLength != null) {
136
            if ($stringLen > $this->minLength) {
137
                throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to long minLength: "
138
                    . $this->minLength);
139
            }
140
        }
141
    }
142
143
    private function checkMaxLength($v)
144
    {
@@ 143-152 (lines=10) @@
140
        }
141
    }
142
143
    private function checkMaxLength($v)
144
    {
145
        $stringLen = strlen($v);
146
        if ($this->maxLength != null) {
147
            if ($stringLen < $this->maxLength) {
148
                throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to short MaxLength: "
149
                    . $this->maxLength);
150
            }
151
        }
152
    }
153
154
    private function checkEnumeration($v)
155
    {