| @@ 1031-1039 (lines=9) @@ | ||
| 1028 | } |
|
| 1029 | } |
|
| 1030 | ||
| 1031 | public static function keyExists($array, $key, $message = '') |
|
| 1032 | { |
|
| 1033 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
| 1034 | static::reportInvalidArgument(sprintf( |
|
| 1035 | $message ?: 'Expected the key %s to exist.', |
|
| 1036 | static::valueToString($key) |
|
| 1037 | )); |
|
| 1038 | } |
|
| 1039 | } |
|
| 1040 | ||
| 1041 | public static function keyNotExists($array, $key, $message = '') |
|
| 1042 | { |
|
| @@ 1041-1049 (lines=9) @@ | ||
| 1038 | } |
|
| 1039 | } |
|
| 1040 | ||
| 1041 | public static function keyNotExists($array, $key, $message = '') |
|
| 1042 | { |
|
| 1043 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
| 1044 | static::reportInvalidArgument(sprintf( |
|
| 1045 | $message ?: 'Expected the key %s to not exist.', |
|
| 1046 | static::valueToString($key) |
|
| 1047 | )); |
|
| 1048 | } |
|
| 1049 | } |
|
| 1050 | ||
| 1051 | public static function count($array, $number, $message = '') |
|
| 1052 | { |
|