Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 1659-1667 (lines=9) @@
1656
     *
1657
     * @throws InvalidArgumentException
1658
     */
1659
    public static function methodExists($classOrObject, $method, $message = '')
1660
    {
1661
        if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) {
1662
            static::reportInvalidArgument(\sprintf(
1663
                $message ?: 'Expected the method %s to exist.',
1664
                static::valueToString($method)
1665
            ));
1666
        }
1667
    }
1668
1669
    /**
1670
     * @psalm-pure
@@ 1679-1687 (lines=9) @@
1676
     *
1677
     * @throws InvalidArgumentException
1678
     */
1679
    public static function methodNotExists($classOrObject, $method, $message = '')
1680
    {
1681
        if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) {
1682
            static::reportInvalidArgument(\sprintf(
1683
                $message ?: 'Expected the method %s to not exist.',
1684
                static::valueToString($method)
1685
            ));
1686
        }
1687
    }
1688
1689
    /**
1690
     * @psalm-pure