src/Asserts/Categories/AssertObjectTrait.php
public static function assertPropertiesInCascade($object, Throwable $exception, string ...$propertiesInCascade)
    {
        foreach ($propertiesInCascade as $property) {
            static::makeAssertion(\property_exists($object, $property), $exception);
            $object = $object->{$property};
        }
        return $object;
    }
public static function assertPropertiesInCascade($object, Throwable $exception, string ...$propertiesInCascade)
    {
        foreach ($propertiesInCascade as $property) {
            static::makeAssertion(\property_exists($object, $property), $exception);
            $object = $object->{$property};
        }
        return $object;
    }
public static function assertPropertiesInCascade ( $ object , Throwable $ exception , string ... $ propertiesInCascade ) { foreach ( $ propertiesInCascade as $ property ) { static :: makeAssertion ( \ property_exists ( $ object , $ property ) , $ exception ) ; $ object = $ object -> { $ property } ; } return $ object ; }
Asserts that a list of properties exist in cascade from an original object.

@param mixed $object The original object to check properties in cascade.
@param Throwable $exception The exception to throw if the assertion fails.
@param string ...$propertiesInCascade The list of properties to check in cascade.
@return mixed The value of the last element to check.
Asserts that a list of properties exist in cascade from an original object .