@@ 915-923 (lines=9) @@ | ||
912 | } |
|
913 | } |
|
914 | ||
915 | public static function keyExists($array, $key, $message = '') |
|
916 | { |
|
917 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
918 | static::reportInvalidArgument(sprintf( |
|
919 | $message ?: 'Expected the key %s to exist.', |
|
920 | static::valueToString($key) |
|
921 | )); |
|
922 | } |
|
923 | } |
|
924 | ||
925 | public static function keyNotExists($array, $key, $message = '') |
|
926 | { |
|
@@ 925-933 (lines=9) @@ | ||
922 | } |
|
923 | } |
|
924 | ||
925 | public static function keyNotExists($array, $key, $message = '') |
|
926 | { |
|
927 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
928 | static::reportInvalidArgument(sprintf( |
|
929 | $message ?: 'Expected the key %s to not exist.', |
|
930 | static::valueToString($key) |
|
931 | )); |
|
932 | } |
|
933 | } |
|
934 | ||
935 | public static function count($array, $number, $message = '') |
|
936 | { |