| @@ 82-91 (lines=10) @@ | ||
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | private function checkMaxLengthString($v) |
|
| 83 | { |
|
| 84 | $stringLen = strlen($v); |
|
| 85 | if ($stringLen < $this->maxLength) { |
|
| 86 | throw new \InvalidArgumentException( |
|
| 87 | "the provided value for " . __CLASS__ . " is to short MaxLength: " |
|
| 88 | . $this->maxLength |
|
| 89 | ); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | private function checkMinLength($v) |
|
| 94 | { |
|
| @@ 116-125 (lines=10) @@ | ||
| 113 | } |
|
| 114 | } |
|
| 115 | ||
| 116 | private function checkMinLengthString($v) |
|
| 117 | { |
|
| 118 | $stringLen = strlen($v); |
|
| 119 | if ($stringLen > $this->minLength) { |
|
| 120 | throw new \InvalidArgumentException( |
|
| 121 | "the provided value for " . __CLASS__ . " is to long MinLength: " |
|
| 122 | . $this->minLength |
|
| 123 | ); |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||
| 127 | private function getLengthForValue($v) |
|
| 128 | { |
|