| @@ 59-69 (lines=11) @@ | ||
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | private function checkMaxLengthArray($v) |
|
| 60 | { |
|
| 61 | assert(is_array($v)); |
|
| 62 | $arrayLen = count($v); |
|
| 63 | if ($arrayLen < $this->maxLength) { |
|
| 64 | throw new \InvalidArgumentException( |
|
| 65 | "the provided value for " . __CLASS__ . " is to short MaxLength: " |
|
| 66 | . $this->maxLength |
|
| 67 | ); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | private function checkMaxLengthString($v) |
|
| 72 | { |
|
| @@ 93-103 (lines=11) @@ | ||
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | private function checkMinLengthArray($v) |
|
| 94 | { |
|
| 95 | assert(is_array($v)); |
|
| 96 | $arrayLen = count($v); |
|
| 97 | if ($arrayLen > $this->minLength) { |
|
| 98 | throw new \InvalidArgumentException( |
|
| 99 | "the provided value for " . __CLASS__ . " is to long MinLength: " |
|
| 100 | . $this->minLength |
|
| 101 | ); |
|
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| 105 | private function checkMinLengthString($v) |
|
| 106 | { |
|