private function before(\DateTime $time, DateTimeFormatInterface $other)
    {
        if ($other instanceof ConcreteDateTimeInterface) {
            // If the other time is the Unix epoch, the time should represent
            // the "end of all time".
            // @see https://docs.theplatform.com/help/media-media-expirationdate
            if ($this->isEpoch($other)) {
                return true;
            }

            return $time <= $other->getDateTime();
        }

        // The other time is a NullDateTime, so we take this to mean the video
        // is available.
        return true;
    }
private function before(\DateTime $time, DateTimeFormatInterface $other)
    {
        if ($other instanceof ConcreteDateTimeInterface) {
            // If the other time is the Unix epoch, the time should represent
            // the "end of all time".
            // @see https://docs.theplatform.com/help/media-media-expirationdate
            if ($this->isEpoch($other)) {
                return true;
            }

            return $time <= $other->getDateTime();
        }

        // The other time is a NullDateTime, so we take this to mean the video
        // is available.
        return true;
    }
private function before ( \ DateTime $ time , DateTimeFormatInterface $ other ) { if ( $ other instanceof ConcreteDateTimeInterface ) { // If the other time is the Unix epoch, the time should represent // the "end of all time". // @see https://docs.theplatform.com/help/media-media-expirationdate if ( $ this -> isEpoch ( $ other ) ) { return true ; } return $ time <= $ other -> getDateTime ( ) ; } // The other time is a NullDateTime, so we take this to mean the video // is available. return true ; }
Return if a time is equal to or before the other time.

@param \DateTime               $time
@param DateTimeFormatInterface $other

@return bool
Return if a time is equal to or before the other time .