@@ 804-812 (lines=9) @@ | ||
801 | } |
|
802 | } |
|
803 | ||
804 | public static function keyExists($array, $key, $message = '') |
|
805 | { |
|
806 | if (!array_key_exists($key, $array)) { |
|
807 | static::reportInvalidArgument(sprintf( |
|
808 | $message ?: 'Expected the key %s to exist.', |
|
809 | static::valueToString($key) |
|
810 | )); |
|
811 | } |
|
812 | } |
|
813 | ||
814 | public static function keyNotExists($array, $key, $message = '') |
|
815 | { |
|
@@ 814-822 (lines=9) @@ | ||
811 | } |
|
812 | } |
|
813 | ||
814 | public static function keyNotExists($array, $key, $message = '') |
|
815 | { |
|
816 | if (array_key_exists($key, $array)) { |
|
817 | static::reportInvalidArgument(sprintf( |
|
818 | $message ?: 'Expected the key %s to not exist.', |
|
819 | static::valueToString($key) |
|
820 | )); |
|
821 | } |
|
822 | } |
|
823 | ||
824 | public static function count($array, $number, $message = '') |
|
825 | { |