| @@ 954-963 (lines=10) @@ | ||
| 951 | ); | |
| 952 | } | |
| 953 | ||
| 954 | public static function minCount($array, $min, $message = '') | |
| 955 |     { | |
| 956 |         if (count($array) < $min) { | |
| 957 | static::reportInvalidArgument(sprintf( | |
| 958 | $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', | |
| 959 | count($array), | |
| 960 | $min | |
| 961 | )); | |
| 962 | } | |
| 963 | } | |
| 964 | ||
| 965 | public static function maxCount($array, $max, $message = '') | |
| 966 |     { | |
| @@ 965-974 (lines=10) @@ | ||
| 962 | } | |
| 963 | } | |
| 964 | ||
| 965 | public static function maxCount($array, $max, $message = '') | |
| 966 |     { | |
| 967 |         if (count($array) > $max) { | |
| 968 | static::reportInvalidArgument(sprintf( | |
| 969 | $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', | |
| 970 | count($array), | |
| 971 | $max | |
| 972 | )); | |
| 973 | } | |
| 974 | } | |
| 975 | ||
| 976 | public static function countBetween($array, $min, $max, $message = '') | |
| 977 |     { | |