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