@@ 1601-1609 (lines=9) @@ | ||
1598 | * |
|
1599 | * @throws InvalidArgumentException |
|
1600 | */ |
|
1601 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
1602 | { |
|
1603 | if (\property_exists($classOrObject, $property)) { |
|
1604 | static::reportInvalidArgument(\sprintf( |
|
1605 | $message ?: 'Expected the property %s to not exist.', |
|
1606 | static::valueToString($property) |
|
1607 | )); |
|
1608 | } |
|
1609 | } |
|
1610 | ||
1611 | /** |
|
1612 | * @psalm-pure |
|
@@ 1581-1589 (lines=9) @@ | ||
1578 | * |
|
1579 | * @throws InvalidArgumentException |
|
1580 | */ |
|
1581 | public static function propertyExists($classOrObject, $property, $message = '') |
|
1582 | { |
|
1583 | if (!\property_exists($classOrObject, $property)) { |
|
1584 | static::reportInvalidArgument(\sprintf( |
|
1585 | $message ?: 'Expected the property %s to exist.', |
|
1586 | static::valueToString($property) |
|
1587 | )); |
|
1588 | } |
|
1589 | } |
|
1590 | ||
1591 | /** |
|
1592 | * @psalm-pure |