public static function fullJoin(TimeSlot $a, TimeSlot $b) {

        // Has full join ?
        if (false === static::hasFullJoin($a, $b)) {
            return null;
        }

        // Initialize the date/times.
        $startDate = DateTimeHelper::getSmaller($a->getStartDate(), $b->getStartDate());
        $endDate   = DateTimeHelper::getGreater($a->getEndDate(), $b->getEndDate());

        // Return the time slot.
        return new TimeSlot(clone $startDate, clone $endDate);
    }
public static function fullJoin(TimeSlot $a, TimeSlot $b) {

        // Has full join ?
        if (false === static::hasFullJoin($a, $b)) {
            return null;
        }

        // Initialize the date/times.
        $startDate = DateTimeHelper::getSmaller($a->getStartDate(), $b->getStartDate());
        $endDate   = DateTimeHelper::getGreater($a->getEndDate(), $b->getEndDate());

        // Return the time slot.
        return new TimeSlot(clone $startDate, clone $endDate);
    }
public static function fullJoin ( TimeSlot $ a , TimeSlot $ b ) { // Has full join ? if ( false === static :: hasFullJoin ( $ a , $ b ) ) { return null ; } // Initialize the date/times. $ startDate = DateTimeHelper :: getSmaller ( $ a -> getStartDate ( ) , $ b -> getStartDate ( ) ) ; $ endDate = DateTimeHelper :: getGreater ( $ a -> getEndDate ( ) , $ b -> getEndDate ( ) ) ; // Return the time slot. return new TimeSlot ( clone $ startDate , clone $ endDate ) ; }
Full join two time slots.

@param TimeSlot $a The time slot A.
@param TimeSlot $b The time slot B.
@return TimeSlot|null Returns a time slot in case of success, null otherwise.
Full join two time slots .