| @@ 760-768 (lines=9) @@ | ||
| 757 | } |
|
| 758 | } |
|
| 759 | ||
| 760 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 761 | { |
|
| 762 | if (!method_exists($classOrObject, $method)) { |
|
| 763 | throw new InvalidArgumentException(sprintf( |
|
| 764 | $message ?: 'Expected the method %s to exist.', |
|
| 765 | self::valueToString($method) |
|
| 766 | )); |
|
| 767 | } |
|
| 768 | } |
|
| 769 | ||
| 770 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 771 | { |
|
| @@ 770-778 (lines=9) @@ | ||
| 767 | } |
|
| 768 | } |
|
| 769 | ||
| 770 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 771 | { |
|
| 772 | if (method_exists($classOrObject, $method)) { |
|
| 773 | throw new InvalidArgumentException(sprintf( |
|
| 774 | $message ?: 'Expected the method %s to not exist.', |
|
| 775 | self::valueToString($method) |
|
| 776 | )); |
|
| 777 | } |
|
| 778 | } |
|
| 779 | ||
| 780 | public static function keyExists($array, $key, $message = '') |
|
| 781 | { |
|