@@ 1022-1030 (lines=9) @@ | ||
1019 | } |
|
1020 | } |
|
1021 | ||
1022 | public static function keyExists($array, $key, $message = '') |
|
1023 | { |
|
1024 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
1025 | static::reportInvalidArgument(sprintf( |
|
1026 | $message ?: 'Expected the key %s to exist.', |
|
1027 | static::valueToString($key) |
|
1028 | )); |
|
1029 | } |
|
1030 | } |
|
1031 | ||
1032 | public static function keyNotExists($array, $key, $message = '') |
|
1033 | { |
|
@@ 1032-1040 (lines=9) @@ | ||
1029 | } |
|
1030 | } |
|
1031 | ||
1032 | public static function keyNotExists($array, $key, $message = '') |
|
1033 | { |
|
1034 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
1035 | static::reportInvalidArgument(sprintf( |
|
1036 | $message ?: 'Expected the key %s to not exist.', |
|
1037 | static::valueToString($key) |
|
1038 | )); |
|
1039 | } |
|
1040 | } |
|
1041 | ||
1042 | public static function count($array, $number, $message = '') |
|
1043 | { |