@@ 1563-1571 (lines=9) @@ | ||
1560 | * |
|
1561 | * @throws InvalidArgumentException |
|
1562 | */ |
|
1563 | public static function propertyExists($classOrObject, $property, $message = '') |
|
1564 | { |
|
1565 | if (!\property_exists($classOrObject, $property)) { |
|
1566 | static::reportInvalidArgument(\sprintf( |
|
1567 | $message ?: 'Expected the property %s to exist.', |
|
1568 | static::valueToString($property) |
|
1569 | )); |
|
1570 | } |
|
1571 | } |
|
1572 | ||
1573 | /** |
|
1574 | * @param string|object $classOrObject |
|
@@ 1580-1588 (lines=9) @@ | ||
1577 | * |
|
1578 | * @throws InvalidArgumentException |
|
1579 | */ |
|
1580 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
1581 | { |
|
1582 | if (\property_exists($classOrObject, $property)) { |
|
1583 | static::reportInvalidArgument(\sprintf( |
|
1584 | $message ?: 'Expected the property %s to not exist.', |
|
1585 | static::valueToString($property) |
|
1586 | )); |
|
1587 | } |
|
1588 | } |
|
1589 | ||
1590 | /** |
|
1591 | * @param string|object $classOrObject |