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