Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 1734-1742 (lines=9) @@
1731
     *
1732
     * @throws InvalidArgumentException
1733
     */
1734
    public static function methodExists($classOrObject, $method, $message = '')
1735
    {
1736
        if (!\method_exists($classOrObject, $method)) {
1737
            static::reportInvalidArgument(\sprintf(
1738
                $message ?: 'Expected the method %s to exist.',
1739
                static::valueToString($method)
1740
            ));
1741
        }
1742
    }
1743
1744
    /**
1745
     * @psalm-pure
@@ 1754-1762 (lines=9) @@
1751
     *
1752
     * @throws InvalidArgumentException
1753
     */
1754
    public static function methodNotExists($classOrObject, $method, $message = '')
1755
    {
1756
        if (\method_exists($classOrObject, $method)) {
1757
            static::reportInvalidArgument(\sprintf(
1758
                $message ?: 'Expected the method %s to not exist.',
1759
                static::valueToString($method)
1760
            ));
1761
        }
1762
    }
1763
1764
    /**
1765
     * @psalm-pure