protected function dateIntervalToSeconds($interval): int
    {
        $now = time();
        $dt = new \DateTime();
        $dt->add($interval);
        $ts = $dt->getTimestamp();
        $diff = $ts - $now;
        return $diff;
    }
protected function dateIntervalToSeconds($interval): int
    {
        $now = time();
        $dt = new \DateTime();
        $dt->add($interval);
        $ts = $dt->getTimestamp();
        $diff = $ts - $now;
        return $diff;
    }
protected function dateIntervalToSeconds ( $ interval ) : int { $ now = time ( ) ; $ dt = new \ DateTime ( ) ; $ dt -> add ( $ interval ) ; $ ts = $ dt -> getTimestamp ( ) ; $ diff = $ ts - $ now ; return $ diff ; }
Converts a \DateInterval object to seconds.

@param \DateInterval $interval The date interval to be converted into seconds.

@return int The number of seconds corresponding to the DateInterval.
Converts a \ DateInterval object to seconds .