src/Domain/Value/DateTime/Time.php
public static function fromNative(DateTimeInterface $dateTime): Time
    {
        $hour = (int) $dateTime->format('G');
        $minute = (int) $dateTime->format('i');
        $second = (int) $dateTime->format('s');

        return new static($hour, $minute, $second);
    }
public static function fromNative(DateTimeInterface $dateTime): Time
    {
        $hour = (int) $dateTime->format('G');
        $minute = (int) $dateTime->format('i');
        $second = (int) $dateTime->format('s');

        return new static($hour, $minute, $second);
    }
public static function fromNative ( DateTimeInterface $ dateTime ) : Time { $ hour = ( int ) $ dateTime -> format ( 'G' ) ; $ minute = ( int ) $ dateTime -> format ( 'i' ) ; $ second = ( int ) $ dateTime -> format ( 's' ) ; return new static ( $ hour , $ minute , $ second ) ; }
Creates an instance from a native DateTime

@param DateTimeInterface $dateTime A DateTimeInterface instance

@return Time
Creates an instance from a native DateTime