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