@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * |
| 80 | 80 | * @access public |
| 81 | 81 | */ |
| 82 | - function Calendar_Month($y, $m, $firstDay=null) |
|
| 82 | + function Calendar_Month($y, $m, $firstDay = null) |
|
| 83 | 83 | { |
| 84 | 84 | parent::Calendar($y, $m); |
| 85 | 85 | $this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | include_once CALENDAR_ROOT.'Day.php'; |
| 100 | 100 | $daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
| 101 | - for ($i=1; $i<=$daysInMonth; $i++) { |
|
| 101 | + for ($i = 1; $i <= $daysInMonth; $i++) { |
|
| 102 | 102 | $this->children[$i] = new Calendar_Day($this->year, $this->month, $i); |
| 103 | 103 | } |
| 104 | 104 | if (count($sDates) > 0) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * |
| 99 | 99 | * @access public |
| 100 | 100 | */ |
| 101 | - function Calendar_Util_Uri($y, $m=null, $d=null, $h=null, $i=null, $s=null) |
|
| 101 | + function Calendar_Util_Uri($y, $m = null, $d = null, $h = null, $i = null, $s = null) |
|
| 102 | 102 | { |
| 103 | 103 | $this->setFragments($y, $m, $d, $h, $i, $s); |
| 104 | 104 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @return void |
| 117 | 117 | * @access public |
| 118 | 118 | */ |
| 119 | - function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) |
|
| 119 | + function setFragments($y, $m = null, $d = null, $h = null, $i = null, $s = null) |
|
| 120 | 120 | { |
| 121 | 121 | if (!is_null($y)) $this->uris['Year'] = $y; |
| 122 | 122 | if (!is_null($m)) $this->uris['Month'] = $m; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * |
| 115 | 115 | * @access protected |
| 116 | 116 | */ |
| 117 | - function Calendar_Table_Helper(& $calendar, $firstDay=null) |
|
| 117 | + function Calendar_Table_Helper(& $calendar, $firstDay = null) |
|
| 118 | 118 | { |
| 119 | 119 | $this->calendar = & $calendar; |
| 120 | 120 | $this->cE = & $calendar->getEngine(); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $this->calendar->thisYear(), $this->calendar->thisMonth()); |
| 173 | 173 | $firstDayInMonth = $this->cE->getFirstDayInMonth( |
| 174 | 174 | $this->calendar->thisYear(), $this->calendar->thisMonth()); |
| 175 | - $this->emptyBefore=0; |
|
| 175 | + $this->emptyBefore = 0; |
|
| 176 | 176 | foreach ($this->daysOfMonth as $dayOfWeek) { |
| 177 | 177 | if ($firstDayInMonth == $dayOfWeek) { |
| 178 | 178 | break; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $this->calendar->thisDay() |
| 189 | 189 | ) |
| 190 | 190 | ); |
| 191 | - for ($i=1; $i < $this->numWeeks; $i++) { |
|
| 191 | + for ($i = 1; $i < $this->numWeeks; $i++) { |
|
| 192 | 192 | $this->daysOfMonth = |
| 193 | 193 | array_merge($this->daysOfMonth, $this->daysOfWeek); |
| 194 | 194 | } |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $this->calendar->thisYear(), |
| 284 | 284 | $this->calendar->thisMonth(), |
| 285 | 285 | $this->calendar->thisDay() |
| 286 | - ) * ($this->numWeeks-1)); |
|
| 286 | + ) * ($this->numWeeks - 1)); |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | /** |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | * |
| 297 | 297 | * @return int timestamp |
| 298 | 298 | */ |
| 299 | - function getWeekStart($y, $m, $d, $firstDay=1) |
|
| 299 | + function getWeekStart($y, $m, $d, $firstDay = 1) |
|
| 300 | 300 | { |
| 301 | 301 | $dow = $this->cE->getDayOfWeek($y, $m, $d); |
| 302 | 302 | if ($dow > $firstDay) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * |
| 109 | 109 | * @access public |
| 110 | 110 | */ |
| 111 | - function Calendar_Month_Weekdays($y, $m, $firstDay=null) |
|
| 111 | + function Calendar_Month_Weekdays($y, $m, $firstDay = null) |
|
| 112 | 112 | { |
| 113 | 113 | parent::Calendar_Month($y, $m, $firstDay); |
| 114 | 114 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | function buildEmptyDaysBefore() |
| 148 | 148 | { |
| 149 | 149 | $eBefore = $this->tableHelper->getEmptyDaysBefore(); |
| 150 | - for ($i=0; $i < $eBefore; $i++) { |
|
| 150 | + for ($i = 0; $i < $eBefore; $i++) { |
|
| 151 | 151 | $stamp = $this->cE->dateToStamp($this->year, $this->month, -$i); |
| 152 | 152 | $Day = new Calendar_Day( |
| 153 | 153 | $this->cE->stampToYear($stamp), |
@@ -183,8 +183,8 @@ discard block |
||
| 183 | 183 | { |
| 184 | 184 | $eAfter = $this->tableHelper->getEmptyDaysAfter(); |
| 185 | 185 | $sDOM = $this->tableHelper->getNumTableDaysInMonth(); |
| 186 | - for ($i=1; $i <= $sDOM-$eAfter; $i++) { |
|
| 187 | - $Day = new Calendar_Day($this->year, $this->month+1, $i); |
|
| 186 | + for ($i = 1; $i <= $sDOM - $eAfter; $i++) { |
|
| 187 | + $Day = new Calendar_Day($this->year, $this->month + 1, $i); |
|
| 188 | 188 | $Day->setEmpty(); |
| 189 | 189 | $Day->adjust(); |
| 190 | 190 | array_push($this->children, $Day); |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | $this->thisDay() |
| 207 | 207 | ); |
| 208 | 208 | $sDOM = $this->tableHelper->getNumTableDaysInMonth(); |
| 209 | - for ($i=1; $i <= $sDOM; $i+= $dIW) { |
|
| 209 | + for ($i = 1; $i <= $sDOM; $i += $dIW) { |
|
| 210 | 210 | $this->children[$i]->setFirst(); |
| 211 | - $this->children[$i+($dIW-1)]->setLast(); |
|
| 211 | + $this->children[$i + ($dIW - 1)]->setLast(); |
|
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @access public |
| 102 | 102 | */ |
| 103 | - function Calendar_Month_Weeks($y, $m, $firstDay=null) |
|
| 103 | + function Calendar_Month_Weeks($y, $m, $firstDay = null) |
|
| 104 | 104 | { |
| 105 | 105 | parent::Calendar_Month($y, $m, $firstDay); |
| 106 | 106 | } |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
| 121 | 121 | include_once CALENDAR_ROOT.'Week.php'; |
| 122 | 122 | $numWeeks = $this->tableHelper->getNumWeeks(); |
| 123 | - for ($i=1, $d=1; $i<=$numWeeks; $i++, |
|
| 124 | - $d+=$this->cE->getDaysInWeek( |
|
| 123 | + for ($i = 1, $d = 1; $i <= $numWeeks; $i++, |
|
| 124 | + $d += $this->cE->getDaysInWeek( |
|
| 125 | 125 | $this->thisYear(), |
| 126 | 126 | $this->thisMonth(), |
| 127 | 127 | $this->thisDay() |