| @@ 780-788 (lines=9) @@ | ||
| 777 | } |
|
| 778 | } |
|
| 779 | ||
| 780 | public static function keyExists($array, $key, $message = '') |
|
| 781 | { |
|
| 782 | if (!array_key_exists($key, $array)) { |
|
| 783 | throw new InvalidArgumentException(sprintf( |
|
| 784 | $message ?: 'Expected the key %s to exist.', |
|
| 785 | self::valueToString($key) |
|
| 786 | )); |
|
| 787 | } |
|
| 788 | } |
|
| 789 | ||
| 790 | public static function keyNotExists($array, $key, $message = '') |
|
| 791 | { |
|
| @@ 790-798 (lines=9) @@ | ||
| 787 | } |
|
| 788 | } |
|
| 789 | ||
| 790 | public static function keyNotExists($array, $key, $message = '') |
|
| 791 | { |
|
| 792 | if (array_key_exists($key, $array)) { |
|
| 793 | throw new InvalidArgumentException(sprintf( |
|
| 794 | $message ?: 'Expected the key %s to not exist.', |
|
| 795 | self::valueToString($key) |
|
| 796 | )); |
|
| 797 | } |
|
| 798 | } |
|
| 799 | ||
| 800 | public static function __callStatic($name, $arguments) |
|
| 801 | { |
|