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