| @@ 925-933 (lines=9) @@ | ||
| 922 | } |
|
| 923 | } |
|
| 924 | ||
| 925 | public static function keyExists($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 exist.', |
|
| 930 | static::valueToString($key) |
|
| 931 | )); |
|
| 932 | } |
|
| 933 | } |
|
| 934 | ||
| 935 | public static function keyNotExists($array, $key, $message = '') |
|
| 936 | { |
|
| @@ 935-943 (lines=9) @@ | ||
| 932 | } |
|
| 933 | } |
|
| 934 | ||
| 935 | public static function keyNotExists($array, $key, $message = '') |
|
| 936 | { |
|
| 937 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
|
| 938 | static::reportInvalidArgument(sprintf( |
|
| 939 | $message ?: 'Expected the key %s to not exist.', |
|
| 940 | static::valueToString($key) |
|
| 941 | )); |
|
| 942 | } |
|
| 943 | } |
|
| 944 | ||
| 945 | public static function count($array, $number, $message = '') |
|
| 946 | { |
|