| @@ 805-813 (lines=9) @@ | ||
| 802 | } |
|
| 803 | } |
|
| 804 | ||
| 805 | public static function keyExists($array, $key, $message = '') |
|
| 806 | { |
|
| 807 | if (!array_key_exists($key, $array)) { |
|
| 808 | static::reportInvalidArgument(sprintf( |
|
| 809 | $message ?: 'Expected the key %s to exist.', |
|
| 810 | static::valueToString($key) |
|
| 811 | )); |
|
| 812 | } |
|
| 813 | } |
|
| 814 | ||
| 815 | public static function keyNotExists($array, $key, $message = '') |
|
| 816 | { |
|
| @@ 815-823 (lines=9) @@ | ||
| 812 | } |
|
| 813 | } |
|
| 814 | ||
| 815 | public static function keyNotExists($array, $key, $message = '') |
|
| 816 | { |
|
| 817 | if (array_key_exists($key, $array)) { |
|
| 818 | static::reportInvalidArgument(sprintf( |
|
| 819 | $message ?: 'Expected the key %s to not exist.', |
|
| 820 | static::valueToString($key) |
|
| 821 | )); |
|
| 822 | } |
|
| 823 | } |
|
| 824 | ||
| 825 | public static function count($array, $number, $message = '') |
|
| 826 | { |
|