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