@@ 979-987 (lines=9) @@ | ||
976 | } |
|
977 | } |
|
978 | ||
979 | public static function keyExists($array, $key, $message = '') |
|
980 | { |
|
981 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
982 | static::reportInvalidArgument(sprintf( |
|
983 | $message ?: 'Expected the key %s to exist.', |
|
984 | static::valueToString($key) |
|
985 | )); |
|
986 | } |
|
987 | } |
|
988 | ||
989 | public static function keyNotExists($array, $key, $message = '') |
|
990 | { |
|
@@ 989-997 (lines=9) @@ | ||
986 | } |
|
987 | } |
|
988 | ||
989 | public static function keyNotExists($array, $key, $message = '') |
|
990 | { |
|
991 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
992 | static::reportInvalidArgument(sprintf( |
|
993 | $message ?: 'Expected the key %s to not exist.', |
|
994 | static::valueToString($key) |
|
995 | )); |
|
996 | } |
|
997 | } |
|
998 | ||
999 | public static function count($array, $number, $message = '') |
|
1000 | { |