@@ 768-776 (lines=9) @@ | ||
765 | } |
|
766 | } |
|
767 | ||
768 | public static function methodExists($classOrObject, $method, $message = '') |
|
769 | { |
|
770 | if (!method_exists($classOrObject, $method)) { |
|
771 | throw new InvalidArgumentException(sprintf( |
|
772 | $message ?: 'Expected the method %s to exist.', |
|
773 | static::valueToString($method) |
|
774 | )); |
|
775 | } |
|
776 | } |
|
777 | ||
778 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
779 | { |
|
@@ 778-786 (lines=9) @@ | ||
775 | } |
|
776 | } |
|
777 | ||
778 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
779 | { |
|
780 | if (method_exists($classOrObject, $method)) { |
|
781 | throw new InvalidArgumentException(sprintf( |
|
782 | $message ?: 'Expected the method %s to not exist.', |
|
783 | static::valueToString($method) |
|
784 | )); |
|
785 | } |
|
786 | } |
|
787 | ||
788 | public static function keyExists($array, $key, $message = '') |
|
789 | { |