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