@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $dayOfWeekForFirstCalendarDay = |
| 67 | 67 | $this->getDayOfWeekForFirstDayOfMonth($time); |
| 68 | 68 | |
| 69 | - return (int)((7 - $dayOfWeekForFirstCalendarDay + $dayOfWeek) % 7) + 1; |
|
| 69 | + return (int) ((7 - $dayOfWeekForFirstCalendarDay + $dayOfWeek) % 7) + 1; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -78,11 +78,11 @@ discard block |
||
| 78 | 78 | \DateTime $time, |
| 79 | 79 | $dayOfWeek |
| 80 | 80 | ) { |
| 81 | - $daysInMonth = (int)$time->format('t'); |
|
| 81 | + $daysInMonth = (int) $time->format('t'); |
|
| 82 | 82 | $dayOfWeekForLastCalendarDay = |
| 83 | 83 | $this->getDayOfWeekForLastDayOfMonth($time); |
| 84 | 84 | |
| 85 | - $offset = (int)((7 - $dayOfWeekForLastCalendarDay + $dayOfWeek) % 7); |
|
| 85 | + $offset = (int) ((7 - $dayOfWeekForLastCalendarDay + $dayOfWeek) % 7); |
|
| 86 | 86 | |
| 87 | 87 | return $daysInMonth - 7 + $offset; |
| 88 | 88 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | protected function getDayOfWeekForFirstDayOfMonth(\DateTime $time) |
| 95 | 95 | { |
| 96 | - return (int)date('N', $this->getTimestampForFirstDayOfMonth($time)); |
|
| 96 | + return (int) date('N', $this->getTimestampForFirstDayOfMonth($time)); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function getDayOfWeekForLastDayOfMonth(\DateTime $time) |
| 104 | 104 | { |
| 105 | - return (int)date('N', $this->getTimestampForLastDayOfMonth($time)); |
|
| 105 | + return (int) date('N', $this->getTimestampForLastDayOfMonth($time)); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $date->setTime(0, 0, 0); |
| 23 | 23 | |
| 24 | 24 | // Current timestamp |
| 25 | - $timestamp = (int)$date->format('U'); |
|
| 25 | + $timestamp = (int) $date->format('U'); |
|
| 26 | 26 | |
| 27 | 27 | // Store current timezone offset |
| 28 | 28 | $this->calculateInitialTimezoneOffset($date); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $firstCalendarDayWithDayOfWeek = |
| 22 | 22 | $this->getLastCalendarDayWithDayOfWeek($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 | |
@@ -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 | |