@@ 939-947 (lines=9) @@ | ||
936 | } |
|
937 | } |
|
938 | ||
939 | public static function keyExists($array, $key, $message = '') |
|
940 | { |
|
941 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
942 | static::reportInvalidArgument(sprintf( |
|
943 | $message ?: 'Expected the key %s to exist.', |
|
944 | static::valueToString($key) |
|
945 | )); |
|
946 | } |
|
947 | } |
|
948 | ||
949 | public static function keyNotExists($array, $key, $message = '') |
|
950 | { |
|
@@ 949-957 (lines=9) @@ | ||
946 | } |
|
947 | } |
|
948 | ||
949 | public static function keyNotExists($array, $key, $message = '') |
|
950 | { |
|
951 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
952 | static::reportInvalidArgument(sprintf( |
|
953 | $message ?: 'Expected the key %s to not exist.', |
|
954 | static::valueToString($key) |
|
955 | )); |
|
956 | } |
|
957 | } |
|
958 | ||
959 | public static function count($array, $number, $message = '') |
|
960 | { |