| @@ 1752-1760 (lines=9) @@ | ||
| 1749 | * |
|
| 1750 | * @throws InvalidArgumentException |
|
| 1751 | */ |
|
| 1752 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 1753 | { |
|
| 1754 | if (!\method_exists($classOrObject, $method)) { |
|
| 1755 | static::reportInvalidArgument(\sprintf( |
|
| 1756 | $message ?: 'Expected the method %s to exist.', |
|
| 1757 | static::valueToString($method) |
|
| 1758 | )); |
|
| 1759 | } |
|
| 1760 | } |
|
| 1761 | ||
| 1762 | /** |
|
| 1763 | * @psalm-pure |
|
| @@ 1772-1780 (lines=9) @@ | ||
| 1769 | * |
|
| 1770 | * @throws InvalidArgumentException |
|
| 1771 | */ |
|
| 1772 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 1773 | { |
|
| 1774 | if (\method_exists($classOrObject, $method)) { |
|
| 1775 | static::reportInvalidArgument(\sprintf( |
|
| 1776 | $message ?: 'Expected the method %s to not exist.', |
|
| 1777 | static::valueToString($method) |
|
| 1778 | )); |
|
| 1779 | } |
|
| 1780 | } |
|
| 1781 | ||
| 1782 | /** |
|
| 1783 | * @psalm-pure |
|