Code Duplication    Length = 6-6 lines in 2 locations

src/SimpleTypeBase.php 2 locations

@@ 117-122 (lines=6) @@
114
    private function isBaseValid($v)
115
    {
116
        $stringLen = strlen($v);
117
        if ($this->minLength != null) {
118
            if ($stringLen > $this->minLength) {
119
                throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to long minLength: "
120
                    . $this->minLength);
121
            }
122
        }
123
        if ($this->maxLength != null) {
124
            if ($stringLen < $this->maxLength) {
125
                throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to short MaxLength: "
@@ 292-297 (lines=6) @@
289
    private function checkMinLength($v)
290
    {
291
        $stringLen = strlen($v);
292
        if ($this->minLength != null) {
293
            if ($stringLen > $this->minLength) {
294
                throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to long minLength: "
295
                    . $this->minLength);
296
            }
297
        }
298
    }
299
}
300