Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 1681-1689 (lines=9) @@
1678
     *
1679
     * @throws InvalidArgumentException
1680
     */
1681
    public static function methodExists($classOrObject, $method, $message = '')
1682
    {
1683
        if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) {
1684
            static::reportInvalidArgument(\sprintf(
1685
                $message ?: 'Expected the method %s to exist.',
1686
                static::valueToString($method)
1687
            ));
1688
        }
1689
    }
1690
1691
    /**
1692
     * @psalm-pure
@@ 1701-1709 (lines=9) @@
1698
     *
1699
     * @throws InvalidArgumentException
1700
     */
1701
    public static function methodNotExists($classOrObject, $method, $message = '')
1702
    {
1703
        if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) {
1704
            static::reportInvalidArgument(\sprintf(
1705
                $message ?: 'Expected the method %s to not exist.',
1706
                static::valueToString($method)
1707
            ));
1708
        }
1709
    }
1710
1711
    /**
1712
     * @psalm-pure