| @@ 1780-1788 (lines=9) @@ | ||
| 1777 | * |
|
| 1778 | * @throws InvalidArgumentException |
|
| 1779 | */ |
|
| 1780 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 1781 | { |
|
| 1782 | if (!\method_exists($classOrObject, $method)) { |
|
| 1783 | static::reportInvalidArgument(\sprintf( |
|
| 1784 | $message ?: 'Expected the method %s to exist.', |
|
| 1785 | static::valueToString($method) |
|
| 1786 | )); |
|
| 1787 | } |
|
| 1788 | } |
|
| 1789 | ||
| 1790 | /** |
|
| 1791 | * @psalm-pure |
|
| @@ 1800-1808 (lines=9) @@ | ||
| 1797 | * |
|
| 1798 | * @throws InvalidArgumentException |
|
| 1799 | */ |
|
| 1800 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 1801 | { |
|
| 1802 | if (\method_exists($classOrObject, $method)) { |
|
| 1803 | static::reportInvalidArgument(\sprintf( |
|
| 1804 | $message ?: 'Expected the method %s to not exist.', |
|
| 1805 | static::valueToString($method) |
|
| 1806 | )); |
|
| 1807 | } |
|
| 1808 | } |
|
| 1809 | ||
| 1810 | /** |
|
| 1811 | * @psalm-pure |
|