| @@ 987-995 (lines=9) @@ | ||
| 984 | } |
|
| 985 | } |
|
| 986 | ||
| 987 | public static function keyExists($array, $key, $message = '') |
|
| 988 | { |
|
| 989 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
| 990 | static::reportInvalidArgument(sprintf( |
|
| 991 | $message ?: 'Expected the key %s to exist.', |
|
| 992 | static::valueToString($key) |
|
| 993 | )); |
|
| 994 | } |
|
| 995 | } |
|
| 996 | ||
| 997 | public static function keyNotExists($array, $key, $message = '') |
|
| 998 | { |
|
| @@ 997-1005 (lines=9) @@ | ||
| 994 | } |
|
| 995 | } |
|
| 996 | ||
| 997 | public static function keyNotExists($array, $key, $message = '') |
|
| 998 | { |
|
| 999 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
| 1000 | static::reportInvalidArgument(sprintf( |
|
| 1001 | $message ?: 'Expected the key %s to not exist.', |
|
| 1002 | static::valueToString($key) |
|
| 1003 | )); |
|
| 1004 | } |
|
| 1005 | } |
|
| 1006 | ||
| 1007 | public static function count($array, $number, $message = '') |
|
| 1008 | { |
|