| @@ 785-793 (lines=9) @@ | ||
| 782 | } |
|
| 783 | } |
|
| 784 | ||
| 785 | public static function keyExists($array, $key, $message = '') |
|
| 786 | { |
|
| 787 | if (!array_key_exists($key, $array)) { |
|
| 788 | static::reportInvalidArgument(sprintf( |
|
| 789 | $message ?: 'Expected the key %s to exist.', |
|
| 790 | static::valueToString($key) |
|
| 791 | )); |
|
| 792 | } |
|
| 793 | } |
|
| 794 | ||
| 795 | public static function keyNotExists($array, $key, $message = '') |
|
| 796 | { |
|
| @@ 795-803 (lines=9) @@ | ||
| 792 | } |
|
| 793 | } |
|
| 794 | ||
| 795 | public static function keyNotExists($array, $key, $message = '') |
|
| 796 | { |
|
| 797 | if (array_key_exists($key, $array)) { |
|
| 798 | static::reportInvalidArgument(sprintf( |
|
| 799 | $message ?: 'Expected the key %s to not exist.', |
|
| 800 | static::valueToString($key) |
|
| 801 | )); |
|
| 802 | } |
|
| 803 | } |
|
| 804 | ||
| 805 | public static function count($array, $number, $message = '') |
|
| 806 | { |
|