|
@@ -52,7 +52,7 @@ discard block |
|
|
block discarded – undo |
|
52
|
52
|
/** |
|
53
|
53
|
* {@inheritdoc} |
|
54
|
54
|
*/ |
|
55
|
|
- public function applyConstraint(CalendarResponse &$calendar_response) { |
|
|
55
|
+ public function applyConstraint(CalendarResponse & $calendar_response) { |
|
56
|
56
|
parent::applyConstraint($calendar_response); |
|
57
|
57
|
|
|
58
|
58
|
if ($this->start_date === NULL) { |
|
@@ -62,13 +62,13 @@ discard block |
|
|
block discarded – undo |
|
62
|
62
|
$this->end_date = new \DateTime('2999-12-31'); |
|
63
|
63
|
} |
|
64
|
64
|
|
|
65
|
|
- if ( (($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() && |
|
|
65
|
+ if ((($calendar_response->getStartDate()->getTimestamp() >= $this->start_date->getTimestamp() && |
|
66
|
66
|
$calendar_response->getStartDate()->getTimestamp() <= $this->end_date->getTimestamp()) || |
|
67
|
67
|
($calendar_response->getEndDate()->getTimestamp() >= $this->start_date->getTimestamp() && |
|
68
|
68
|
$calendar_response->getEndDate()->getTimestamp() <= $this->end_date->getTimestamp()) || |
|
69
|
69
|
($calendar_response->getStartDate()->getTimestamp() <= $this->start_date->getTimestamp() && |
|
70
|
70
|
$calendar_response->getEndDate()->getTimestamp() >= $this->end_date->getTimestamp())) && |
|
71
|
|
- ($this->checkin_day === NULL || $this->checkin_day == $calendar_response->getStartDate()->format('N')) ) { |
|
|
71
|
+ ($this->checkin_day === NULL || $this->checkin_day == $calendar_response->getStartDate()->format('N'))) { |
|
72
|
72
|
|
|
73
|
73
|
$units = $this->getUnits(); |
|
74
|
74
|
|
|
@@ -107,8 +107,8 @@ discard block |
|
|
block discarded – undo |
|
107
|
107
|
$text = ''; |
|
108
|
108
|
|
|
109
|
109
|
// Min/max stay length constraint variables. |
|
110
|
|
- $minimum_stay = empty($this->min_days) ? '' : (($this->min_days == 1) ? $this->min_days . ' day' : $this->min_days . ' days'); |
|
111
|
|
- $maximum_stay = empty($this->max_days) ? '' : (($this->max_days == 1) ? $this->max_days . ' day' : $this->max_days . ' days'); |
|
|
110
|
+ $minimum_stay = empty($this->min_days) ? '' : (($this->min_days == 1) ? $this->min_days.' day' : $this->min_days.' days'); |
|
|
111
|
+ $maximum_stay = empty($this->max_days) ? '' : (($this->max_days == 1) ? $this->max_days.' day' : $this->max_days.' days'); |
|
112
|
112
|
|
|
113
|
113
|
// Day of the week constraint variable. |
|
114
|
114
|
$day_of_the_week = $this->getWeekDay($this->checkin_day); |