@@ 903-911 (lines=9) @@ | ||
900 | } |
|
901 | } |
|
902 | ||
903 | public static function keyExists($array, $key, $message = '') |
|
904 | { |
|
905 | if (!(isset($array[$key]) || array_key_exists($key, $array))) { |
|
906 | static::reportInvalidArgument(sprintf( |
|
907 | $message ?: 'Expected the key %s to exist.', |
|
908 | static::valueToString($key) |
|
909 | )); |
|
910 | } |
|
911 | } |
|
912 | ||
913 | public static function keyNotExists($array, $key, $message = '') |
|
914 | { |
|
@@ 913-921 (lines=9) @@ | ||
910 | } |
|
911 | } |
|
912 | ||
913 | public static function keyNotExists($array, $key, $message = '') |
|
914 | { |
|
915 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
916 | static::reportInvalidArgument(sprintf( |
|
917 | $message ?: 'Expected the key %s to not exist.', |
|
918 | static::valueToString($key) |
|
919 | )); |
|
920 | } |
|
921 | } |
|
922 | ||
923 | public static function count($array, $number, $message = '') |
|
924 | { |