Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 1541-1549 (lines=9) @@
1538
     *
1539
     * @throws InvalidArgumentException
1540
     */
1541
    public static function propertyExists($classOrObject, $property, $message = '')
1542
    {
1543
        if (!\property_exists($classOrObject, $property)) {
1544
            static::reportInvalidArgument(\sprintf(
1545
                $message ?: 'Expected the property %s to exist.',
1546
                static::valueToString($property)
1547
            ));
1548
        }
1549
    }
1550
1551
    /**
1552
     * @psalm-param class-string|object $classOrObject
@@ 1559-1567 (lines=9) @@
1556
     *
1557
     * @throws InvalidArgumentException
1558
     */
1559
    public static function propertyNotExists($classOrObject, $property, $message = '')
1560
    {
1561
        if (\property_exists($classOrObject, $property)) {
1562
            static::reportInvalidArgument(\sprintf(
1563
                $message ?: 'Expected the property %s to not exist.',
1564
                static::valueToString($property)
1565
            ));
1566
        }
1567
    }
1568
1569
    /**
1570
     * @psalm-param class-string|object $classOrObject