| @@ 1004-1012 (lines=9) @@ | ||
| 1001 | } |
|
| 1002 | } |
|
| 1003 | ||
| 1004 | public static function keyExists($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 exist.', |
|
| 1009 | static::valueToString($key) |
|
| 1010 | )); |
|
| 1011 | } |
|
| 1012 | } |
|
| 1013 | ||
| 1014 | public static function keyNotExists($array, $key, $message = '') |
|
| 1015 | { |
|
| @@ 1014-1022 (lines=9) @@ | ||
| 1011 | } |
|
| 1012 | } |
|
| 1013 | ||
| 1014 | public static function keyNotExists($array, $key, $message = '') |
|
| 1015 | { |
|
| 1016 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
| 1017 | static::reportInvalidArgument(sprintf( |
|
| 1018 | $message ?: 'Expected the key %s to not exist.', |
|
| 1019 | static::valueToString($key) |
|
| 1020 | )); |
|
| 1021 | } |
|
| 1022 | } |
|
| 1023 | ||
| 1024 | public static function count($array, $number, $message = '') |
|
| 1025 | { |
|