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