| @@ 71-80 (lines=10) @@ | ||
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | private function checkMaxLengthString($v) |
|
| 72 | { |
|
| 73 | $stringLen = strlen($v); |
|
| 74 | if ($stringLen < $this->maxLength) { |
|
| 75 | throw new \InvalidArgumentException( |
|
| 76 | "the provided value for " . __CLASS__ . " is to short MaxLength: " |
|
| 77 | . $this->maxLength |
|
| 78 | ); |
|
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | private function checkMinLength($v) |
|
| 83 | { |
|
| @@ 105-114 (lines=10) @@ | ||
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| 105 | private function checkMinLengthString($v) |
|
| 106 | { |
|
| 107 | $stringLen = strlen($v); |
|
| 108 | if ($stringLen > $this->minLength) { |
|
| 109 | throw new \InvalidArgumentException( |
|
| 110 | "the provided value for " . __CLASS__ . " is to long MinLength: " |
|
| 111 | . $this->minLength |
|
| 112 | ); |
|
| 113 | } |
|
| 114 | } |
|
| 115 | } |
|
| 116 | ||