Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 1710-1718 (lines=9) @@
1707
     *
1708
     * @throws InvalidArgumentException
1709
     */
1710
    public static function propertyExists($classOrObject, $property, $message = '')
1711
    {
1712
        if (!\property_exists($classOrObject, $property)) {
1713
            static::reportInvalidArgument(\sprintf(
1714
                $message ?: 'Expected the property %s to exist.',
1715
                static::valueToString($property)
1716
            ));
1717
        }
1718
    }
1719
1720
    /**
1721
     * @psalm-pure
@@ 1730-1738 (lines=9) @@
1727
     *
1728
     * @throws InvalidArgumentException
1729
     */
1730
    public static function propertyNotExists($classOrObject, $property, $message = '')
1731
    {
1732
        if (\property_exists($classOrObject, $property)) {
1733
            static::reportInvalidArgument(\sprintf(
1734
                $message ?: 'Expected the property %s to not exist.',
1735
                static::valueToString($property)
1736
            ));
1737
        }
1738
    }
1739
1740
    /**
1741
     * @psalm-pure