| @@ 936-945 (lines=10) @@ | ||
| 933 | ); | |
| 934 | } | |
| 935 | ||
| 936 | public static function minCount($array, $min, $message = '') | |
| 937 |     { | |
| 938 |         if (count($array) < $min) { | |
| 939 | static::reportInvalidArgument(sprintf( | |
| 940 | $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', | |
| 941 | count($array), | |
| 942 | $min | |
| 943 | )); | |
| 944 | } | |
| 945 | } | |
| 946 | ||
| 947 | public static function maxCount($array, $max, $message = '') | |
| 948 |     { | |
| @@ 947-956 (lines=10) @@ | ||
| 944 | } | |
| 945 | } | |
| 946 | ||
| 947 | public static function maxCount($array, $max, $message = '') | |
| 948 |     { | |
| 949 |         if (count($array) > $max) { | |
| 950 | static::reportInvalidArgument(sprintf( | |
| 951 | $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', | |
| 952 | count($array), | |
| 953 | $max | |
| 954 | )); | |
| 955 | } | |
| 956 | } | |
| 957 | ||
| 958 | public static function countBetween($array, $min, $max, $message = '') | |
| 959 |     { | |