@@ -62,6 +62,6 @@ |
||
62 | 62 | $time->format('n'), |
63 | 63 | $time->format('j') |
64 | 64 | ); |
65 | - return (int)$result->format('U'); |
|
65 | + return (int) $result->format('U'); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $lastCalendarDayWithDayOfWeek = |
22 | 22 | $this->getLastCalendarDayWithDayOfWeek($date, $this->dayOfWeek); |
23 | 23 | |
24 | - if ((int)$date->format('j') >= $lastCalendarDayWithDayOfWeek) { |
|
24 | + if ((int) $date->format('j') >= $lastCalendarDayWithDayOfWeek) { |
|
25 | 25 | $date->add(new \DateInterval('P1M')); |
26 | 26 | } |
27 | 27 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $firstCalendarDayWithDayOfWeek = |
22 | 22 | $this->getFirstCalendarDayWithDayOfWeek($date, $this->dayOfWeek); |
23 | 23 | |
24 | - if ((int)$date->format('j') >= $firstCalendarDayWithDayOfWeek) { |
|
24 | + if ((int) $date->format('j') >= $firstCalendarDayWithDayOfWeek) { |
|
25 | 25 | $date->add(new \DateInterval('P1M')); |
26 | 26 | } |
27 | 27 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $date->setTime(0, 0, 0); |
21 | 21 | |
22 | 22 | // Current timestamp |
23 | - $timestamp = (int)$date->format('U'); |
|
23 | + $timestamp = (int) $date->format('U'); |
|
24 | 24 | |
25 | 25 | // Calculate distance to next isochronic timestamp |
26 | 26 | $isochronicOffset = $this->getIsochronicOffset($date); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | throw new \OutOfBoundsException('Day of month greater than 31'); |
33 | 33 | } |
34 | 34 | |
35 | - $this->calendarDay = (int)$calendarDay; |
|
35 | + $this->calendarDay = (int) $calendarDay; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | protected function getDayLimitedToDaysInMonth(\DateTime $time) |
48 | 48 | { |
49 | - return min($this->calendarDay, (int)$time->format('t')); |
|
49 | + return min($this->calendarDay, (int) $time->format('t')); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $firstCalendarDayWithDayOfWeek = |
22 | 22 | $this->getFirstCalendarDayWithDayOfWeek($date, $this->dayOfWeek); |
23 | 23 | |
24 | - if ((int)$date->format('j') <= $firstCalendarDayWithDayOfWeek) { |
|
24 | + if ((int) $date->format('j') <= $firstCalendarDayWithDayOfWeek) { |
|
25 | 25 | $date->sub(new \DateInterval('P1M')); |
26 | 26 | } |
27 | 27 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function getDayOfMonth() |
58 | 58 | { |
59 | - return (int)$this->date->format('j'); |
|
59 | + return (int) $this->date->format('j'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function isWeekday() |
94 | 94 | { |
95 | - $dayOfWeek = (int)$this->date->format('N'); |
|
95 | + $dayOfWeek = (int) $this->date->format('N'); |
|
96 | 96 | return $dayOfWeek <= 5; |
97 | 97 | } |
98 | 98 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function addMonth() |
144 | 144 | { |
145 | 145 | $year = $this->date->format('Y'); |
146 | - $month = (int)$this->date->format('n') + 1; |
|
146 | + $month = (int) $this->date->format('n') + 1; |
|
147 | 147 | if (13 === $month) { |
148 | 148 | $month = 1; |
149 | 149 | $year++; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | public function subtractMonth() |
162 | 162 | { |
163 | 163 | $year = $this->date->format('Y'); |
164 | - $month = (int)$this->date->format('n') - 1; |
|
164 | + $month = (int) $this->date->format('n') - 1; |
|
165 | 165 | if (0 === $month) { |
166 | 166 | $month = 12; |
167 | 167 | $year--; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function getDaysInMonth() |
180 | 180 | { |
181 | - return (int)$this->date->format('t'); |
|
181 | + return (int) $this->date->format('t'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function toLastWorkday() |
211 | 211 | { |
212 | - $this->setDayOfMonth((int)$this->date->format('t')); |
|
212 | + $this->setDayOfMonth((int) $this->date->format('t')); |
|
213 | 213 | $this->decrementToWorkday(); |
214 | 214 | |
215 | 215 | return $this; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | public function key() |
61 | 61 | { |
62 | - return (int)$this->time->format('U'); |
|
62 | + return (int) $this->time->format('U'); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | '2015-04-30 00:00:00', // Starting time |
49 | 49 | '2015-04-03 00:00:00', // Expected time |
50 | 50 | [ |
51 | - '2015-04-01', // Holidays |
|
51 | + '2015-04-01', // Holidays |
|
52 | 52 | '2015-04-02' |
53 | 53 | ] |
54 | 54 | ), |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | '2015-11-30 00:00:00', // Starting time |
58 | 58 | '2015-11-04 00:00:00', // Expected time |
59 | 59 | [ |
60 | - '2015-11-02', // Holidays |
|
60 | + '2015-11-02', // Holidays |
|
61 | 61 | '2015-11-03' |
62 | 62 | ] |
63 | 63 | ) |