@@ 1635-1643 (lines=9) @@ | ||
1632 | * |
|
1633 | * @throws InvalidArgumentException |
|
1634 | */ |
|
1635 | public static function methodExists($classOrObject, $method, $message = '') |
|
1636 | { |
|
1637 | if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) { |
|
1638 | static::reportInvalidArgument(\sprintf( |
|
1639 | $message ?: 'Expected the method %s to exist.', |
|
1640 | static::valueToString($method) |
|
1641 | )); |
|
1642 | } |
|
1643 | } |
|
1644 | ||
1645 | /** |
|
1646 | * @psalm-pure |
|
@@ 1655-1663 (lines=9) @@ | ||
1652 | * |
|
1653 | * @throws InvalidArgumentException |
|
1654 | */ |
|
1655 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
1656 | { |
|
1657 | if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) { |
|
1658 | static::reportInvalidArgument(\sprintf( |
|
1659 | $message ?: 'Expected the method %s to not exist.', |
|
1660 | static::valueToString($method) |
|
1661 | )); |
|
1662 | } |
|
1663 | } |
|
1664 | ||
1665 | /** |
|
1666 | * @psalm-pure |