private function getDayBefore($dayNumber)
    {
        $tmpDayNumber = $dayNumber;

        for ($i = 0; $i < 6; $i++) {
            $tmpDayNumber = (Days::MONDAY === $tmpDayNumber) ? Days::SUNDAY : --$tmpDayNumber;

            if (null !== $day = $this->getDay($tmpDayNumber)) {
                return $day;
            }
        }

        return $this->getDay($dayNumber);
    }
private function getDayBefore($dayNumber)
    {
        $tmpDayNumber = $dayNumber;

        for ($i = 0; $i < 6; $i++) {
            $tmpDayNumber = (Days::MONDAY === $tmpDayNumber) ? Days::SUNDAY : --$tmpDayNumber;

            if (null !== $day = $this->getDay($tmpDayNumber)) {
                return $day;
            }
        }

        return $this->getDay($dayNumber);
    }
private function getDayBefore ( $ dayNumber ) { $ tmpDayNumber = $ dayNumber ; for ( $ i = 0 ; $ i < 6 ; $ i ++ ) { $ tmpDayNumber = ( Days :: MONDAY === $ tmpDayNumber ) ? Days :: SUNDAY : -- $ tmpDayNumber ; if ( null !== $ day = $ this -> getDay ( $ tmpDayNumber ) ) { return $ day ; } } return $ this -> getDay ( $ dayNumber ) ; }
Gets the business day before the day number.

@param int $dayNumber

@return DayInterface|null
Gets the business day before the day number .