@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | 'in' => ['year' => 'int', 'month' => 'int'], |
25 | 25 | 'out' => ['month' => '{urn:PEAR_SOAP_Calendar}Month'], |
26 | 26 | ]; |
27 | - $this->__typedef['Month'] = [ |
|
27 | + $this->__typedef['Month'] = [ |
|
28 | 28 | 'monthname' => 'string', |
29 | 29 | 'days' => '{urn:PEAR_SOAP_Calendar}MonthDays', |
30 | 30 | ]; |
@@ -58,13 +58,13 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function getMonth($year, $month) |
60 | 60 | { |
61 | - require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
61 | + require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
62 | 62 | $Month = new Calendar_Month_Weekdays($year, $month); |
63 | 63 | if (!$Month->isValid()) { |
64 | 64 | $V = $Month->getValidator(); |
65 | 65 | $errorMsg = ''; |
66 | 66 | while ($error = $V->fetch()) { |
67 | - $errorMsg .= $error->toString() . "\n"; |
|
67 | + $errorMsg .= $error->toString()."\n"; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return new SOAP_Fault($errorMsg, 'Client'); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | $Month->build(); |
75 | 75 | while ($Day = $Month->fetch()) { |
76 | 76 | $day = [ |
77 | - 'isFirst' => (int)$Day->isFirst(), |
|
78 | - 'isLast' => (int)$Day->isLast(), |
|
79 | - 'isEmpty' => (int)$Day->isEmpty(), |
|
80 | - 'day' => (int)$Day->thisDay(), |
|
77 | + 'isFirst' => (int) $Day->isFirst(), |
|
78 | + 'isLast' => (int) $Day->isLast(), |
|
79 | + 'isEmpty' => (int) $Day->isEmpty(), |
|
80 | + 'day' => (int) $Day->thisDay(), |
|
81 | 81 | ]; |
82 | 82 | $days[] = $day; |
83 | 83 | } |
@@ -39,33 +39,33 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | switch (@$_GET['view']) { |
42 | - default: |
|
43 | - $_GET['view'] = 'calendar_year'; |
|
44 | - // no break |
|
45 | - case 'calendar_year': |
|
46 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
47 | - $c = new Calendar_Year($_GET['y']); |
|
48 | - break; |
|
49 | - case 'calendar_month': |
|
50 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
51 | - $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
52 | - break; |
|
53 | - case 'calendar_day': |
|
54 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
55 | - $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
56 | - break; |
|
57 | - case 'calendar_hour': |
|
58 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
59 | - $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
60 | - break; |
|
61 | - case 'calendar_minute': |
|
62 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
63 | - $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
64 | - break; |
|
65 | - case 'calendar_second': |
|
66 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
67 | - $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
68 | - break; |
|
42 | + default: |
|
43 | + $_GET['view'] = 'calendar_year'; |
|
44 | + // no break |
|
45 | + case 'calendar_year': |
|
46 | + require_once CALENDAR_ROOT . 'Year.php'; |
|
47 | + $c = new Calendar_Year($_GET['y']); |
|
48 | + break; |
|
49 | + case 'calendar_month': |
|
50 | + require_once CALENDAR_ROOT . 'Month.php'; |
|
51 | + $c = new Calendar_Month($_GET['y'], $_GET['m']); |
|
52 | + break; |
|
53 | + case 'calendar_day': |
|
54 | + require_once CALENDAR_ROOT . 'Day.php'; |
|
55 | + $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
|
56 | + break; |
|
57 | + case 'calendar_hour': |
|
58 | + require_once CALENDAR_ROOT . 'Hour.php'; |
|
59 | + $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
|
60 | + break; |
|
61 | + case 'calendar_minute': |
|
62 | + require_once CALENDAR_ROOT . 'Minute.php'; |
|
63 | + $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
|
64 | + break; |
|
65 | + case 'calendar_second': |
|
66 | + require_once CALENDAR_ROOT . 'Second.php'; |
|
67 | + $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
|
68 | + break; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | // Convert timestamp to human readable date |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | list($usec, $sec) = explode(' ', microtime()); |
11 | 11 | |
12 | - return (float)$usec + (float)$sec; |
|
12 | + return (float) $usec + (float) $sec; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | // Switch to PEAR::Date engine |
@@ -43,27 +43,27 @@ discard block |
||
43 | 43 | $_GET['view'] = 'calendar_year'; |
44 | 44 | // no break |
45 | 45 | case 'calendar_year': |
46 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
46 | + require_once CALENDAR_ROOT.'Year.php'; |
|
47 | 47 | $c = new Calendar_Year($_GET['y']); |
48 | 48 | break; |
49 | 49 | case 'calendar_month': |
50 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
50 | + require_once CALENDAR_ROOT.'Month.php'; |
|
51 | 51 | $c = new Calendar_Month($_GET['y'], $_GET['m']); |
52 | 52 | break; |
53 | 53 | case 'calendar_day': |
54 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
54 | + require_once CALENDAR_ROOT.'Day.php'; |
|
55 | 55 | $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
56 | 56 | break; |
57 | 57 | case 'calendar_hour': |
58 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
58 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
59 | 59 | $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
60 | 60 | break; |
61 | 61 | case 'calendar_minute': |
62 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
62 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
63 | 63 | $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
64 | 64 | break; |
65 | 65 | case 'calendar_second': |
66 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
66 | + require_once CALENDAR_ROOT.'Second.php'; |
|
67 | 67 | $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
68 | 68 | break; |
69 | 69 | } |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $date = new Date($c->getTimestamp()); |
73 | 73 | |
74 | 74 | echo '<h1>Using PEAR::Date engine</h1>'; |
75 | -echo 'Viewing: ' . @$_GET['view'] . '<br>'; |
|
76 | -echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >'; |
|
75 | +echo 'Viewing: '.@$_GET['view'].'<br>'; |
|
76 | +echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >'; |
|
77 | 77 | |
78 | 78 | $i = 1; |
79 | 79 | echo '<h1>First Iteration</h1>'; |
@@ -83,15 +83,15 @@ discard block |
||
83 | 83 | $c->build(); |
84 | 84 | while ($e = $c->fetch()) { |
85 | 85 | $class = strtolower(get_class($e)); |
86 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
87 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
88 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
86 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
87 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
88 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
89 | 89 | if (($i % 10) == 0) { |
90 | 90 | echo '<br>'; |
91 | 91 | } |
92 | 92 | ++$i; |
93 | 93 | } |
94 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
94 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
95 | 95 | |
96 | 96 | $i = 1; |
97 | 97 | echo '<h1>Second Iteration</h1>'; |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $start = getmicrotime(); |
101 | 101 | while ($e = $c->fetch()) { |
102 | 102 | $class = strtolower(get_class($e)); |
103 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
104 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
105 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
103 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
104 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
105 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
106 | 106 | if (($i % 10) == 0) { |
107 | 107 | echo '<br>'; |
108 | 108 | } |
109 | 109 | ++$i; |
110 | 110 | } |
111 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
111 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | if (!@include 'Calendar/Calendar.php') { |
7 | 7 | define('CALENDAR_ROOT', '../../'); |
8 | 8 | } |
9 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
10 | -require_once CALENDAR_ROOT . 'Hour.php'; |
|
11 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
9 | +require_once CALENDAR_ROOT.'Day.php'; |
|
10 | +require_once CALENDAR_ROOT.'Hour.php'; |
|
11 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
12 | 12 | |
13 | 13 | // Decorator to "attach" functionality to selected hours |
14 | 14 | |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | FROM |
55 | 55 | diary |
56 | 56 | WHERE |
57 | - eventtime >= '" . $Day->thisDay(true) . "' |
|
57 | + eventtime >= '" . $Day->thisDay(true)."' |
|
58 | 58 | AND |
59 | - eventtime < '" . $Day->nextDay(true) . "';"; |
|
59 | + eventtime < '" . $Day->nextDay(true)."';"; |
|
60 | 60 | |
61 | 61 | // An array simulating data from a database |
62 | 62 | $result = [ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | // If the hour is selected, call the decorator method... |
114 | 114 | if ($Hour->isSelected()) { |
115 | - echo '<td bgcolor="silver">' . $Hour->getEntry() . "</td>\n"; |
|
115 | + echo '<td bgcolor="silver">'.$Hour->getEntry()."</td>\n"; |
|
116 | 116 | } else { |
117 | 117 | echo "<td> </td>\n"; |
118 | 118 | } |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function __construct(&$calendar) |
92 | 92 | { |
93 | - $this->calendar =& $calendar; |
|
94 | - $this->cE =& $calendar->getEngine(); |
|
93 | + $this->calendar = & $calendar; |
|
94 | + $this->cE = & $calendar->getEngine(); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | 'isValidMinute', |
110 | 110 | 'isValidSecond', |
111 | 111 | ]; |
112 | - $valid = true; |
|
112 | + $valid = true; |
|
113 | 113 | foreach ($checks as $check) { |
114 | 114 | if (!$this->{$check}()) { |
115 | 115 | $valid = false; |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | $y = $this->calendar->thisYear(); |
130 | 130 | $min = $this->cE->getMinYears(); |
131 | 131 | if ($min > $y) { |
132 | - $this->errors[] = new Calendar_Validation_Error('Year', $y, CALENDAR_VALUE_TOOSMALL . $min); |
|
132 | + $this->errors[] = new Calendar_Validation_Error('Year', $y, CALENDAR_VALUE_TOOSMALL.$min); |
|
133 | 133 | |
134 | 134 | return false; |
135 | 135 | } |
136 | 136 | $max = $this->cE->getMaxYears(); |
137 | 137 | if ($y > $max) { |
138 | - $this->errors[] = new Calendar_Validation_Error('Year', $y, CALENDAR_VALUE_TOOLARGE . $max); |
|
138 | + $this->errors[] = new Calendar_Validation_Error('Year', $y, CALENDAR_VALUE_TOOLARGE.$max); |
|
139 | 139 | |
140 | 140 | return false; |
141 | 141 | } |
@@ -153,13 +153,13 @@ discard block |
||
153 | 153 | $m = $this->calendar->thisMonth(); |
154 | 154 | $min = 1; |
155 | 155 | if ($min > $m) { |
156 | - $this->errors[] = new Calendar_Validation_Error('Month', $m, CALENDAR_VALUE_TOOSMALL . $min); |
|
156 | + $this->errors[] = new Calendar_Validation_Error('Month', $m, CALENDAR_VALUE_TOOSMALL.$min); |
|
157 | 157 | |
158 | 158 | return false; |
159 | 159 | } |
160 | 160 | $max = $this->cE->getMonthsInYear($this->calendar->thisYear()); |
161 | 161 | if ($m > $max) { |
162 | - $this->errors[] = new Calendar_Validation_Error('Month', $m, CALENDAR_VALUE_TOOLARGE . $max); |
|
162 | + $this->errors[] = new Calendar_Validation_Error('Month', $m, CALENDAR_VALUE_TOOLARGE.$max); |
|
163 | 163 | |
164 | 164 | return false; |
165 | 165 | } |
@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | $d = $this->calendar->thisDay(); |
178 | 178 | $min = 1; |
179 | 179 | if ($min > $d) { |
180 | - $this->errors[] = new Calendar_Validation_Error('Day', $d, CALENDAR_VALUE_TOOSMALL . $min); |
|
180 | + $this->errors[] = new Calendar_Validation_Error('Day', $d, CALENDAR_VALUE_TOOSMALL.$min); |
|
181 | 181 | |
182 | 182 | return false; |
183 | 183 | } |
184 | 184 | $max = $this->cE->getDaysInMonth($this->calendar->thisYear(), $this->calendar->thisMonth()); |
185 | 185 | if ($d > $max) { |
186 | - $this->errors[] = new Calendar_Validation_Error('Day', $d, CALENDAR_VALUE_TOOLARGE . $max); |
|
186 | + $this->errors[] = new Calendar_Validation_Error('Day', $d, CALENDAR_VALUE_TOOLARGE.$max); |
|
187 | 187 | |
188 | 188 | return false; |
189 | 189 | } |
@@ -201,13 +201,13 @@ discard block |
||
201 | 201 | $h = $this->calendar->thisHour(); |
202 | 202 | $min = 0; |
203 | 203 | if ($min > $h) { |
204 | - $this->errors[] = new Calendar_Validation_Error('Hour', $h, CALENDAR_VALUE_TOOSMALL . $min); |
|
204 | + $this->errors[] = new Calendar_Validation_Error('Hour', $h, CALENDAR_VALUE_TOOSMALL.$min); |
|
205 | 205 | |
206 | 206 | return false; |
207 | 207 | } |
208 | 208 | $max = ($this->cE->getHoursInDay($this->calendar->thisDay()) - 1); |
209 | 209 | if ($h > $max) { |
210 | - $this->errors[] = new Calendar_Validation_Error('Hour', $h, CALENDAR_VALUE_TOOLARGE . $max); |
|
210 | + $this->errors[] = new Calendar_Validation_Error('Hour', $h, CALENDAR_VALUE_TOOLARGE.$max); |
|
211 | 211 | |
212 | 212 | return false; |
213 | 213 | } |
@@ -225,13 +225,13 @@ discard block |
||
225 | 225 | $i = $this->calendar->thisMinute(); |
226 | 226 | $min = 0; |
227 | 227 | if ($min > $i) { |
228 | - $this->errors[] = new Calendar_Validation_Error('Minute', $i, CALENDAR_VALUE_TOOSMALL . $min); |
|
228 | + $this->errors[] = new Calendar_Validation_Error('Minute', $i, CALENDAR_VALUE_TOOSMALL.$min); |
|
229 | 229 | |
230 | 230 | return false; |
231 | 231 | } |
232 | 232 | $max = ($this->cE->getMinutesInHour($this->calendar->thisHour()) - 1); |
233 | 233 | if ($i > $max) { |
234 | - $this->errors[] = new Calendar_Validation_Error('Minute', $i, CALENDAR_VALUE_TOOLARGE . $max); |
|
234 | + $this->errors[] = new Calendar_Validation_Error('Minute', $i, CALENDAR_VALUE_TOOLARGE.$max); |
|
235 | 235 | |
236 | 236 | return false; |
237 | 237 | } |
@@ -249,13 +249,13 @@ discard block |
||
249 | 249 | $s = $this->calendar->thisSecond(); |
250 | 250 | $min = 0; |
251 | 251 | if ($min > $s) { |
252 | - $this->errors[] = new Calendar_Validation_Error('Second', $s, CALENDAR_VALUE_TOOSMALL . $min); |
|
252 | + $this->errors[] = new Calendar_Validation_Error('Second', $s, CALENDAR_VALUE_TOOSMALL.$min); |
|
253 | 253 | |
254 | 254 | return false; |
255 | 255 | } |
256 | 256 | $max = ($this->cE->getSecondsInMinute($this->calendar->thisMinute()) - 1); |
257 | 257 | if ($s > $max) { |
258 | - $this->errors[] = new Calendar_Validation_Error('Second', $s, CALENDAR_VALUE_TOOLARGE . $max); |
|
258 | + $this->errors[] = new Calendar_Validation_Error('Second', $s, CALENDAR_VALUE_TOOLARGE.$max); |
|
259 | 259 | |
260 | 260 | return false; |
261 | 261 | } |
@@ -367,6 +367,6 @@ discard block |
||
367 | 367 | */ |
368 | 368 | public function toString() |
369 | 369 | { |
370 | - return $this->unit . ' = ' . $this->value . ' [' . $this->message . ']'; |
|
370 | + return $this->unit.' = '.$this->value.' ['.$this->message.']'; |
|
371 | 371 | } |
372 | 372 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents a Day and builds Hours. |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function build($sDates = []) |
115 | 115 | { |
116 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
116 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
117 | 117 | |
118 | 118 | $hID = $this->cE->getHoursInDay($this->year, $this->month, $this->day); |
119 | 119 | for ($i = 0; $i < $hID; ++$i) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | foreach ($sDates as $sDate) { |
138 | 138 | if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth() |
139 | 139 | && $this->day == $sDate->thisDay()) { |
140 | - $key = (int)$sDate->thisHour(); |
|
140 | + $key = (int) $sDate->thisHour(); |
|
141 | 141 | if (isset($this->children[$key])) { |
142 | 142 | $sDate->setSelected(); |
143 | 143 | $this->children[$key] = $sDate; |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Load Calendar base class. |
52 | 52 | */ |
53 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
53 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Load base month. |
57 | 57 | */ |
58 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
58 | +require_once CALENDAR_ROOT.'Month.php'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Represents a Month and builds Weeks |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function build($sDates = []) |
118 | 118 | { |
119 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
119 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
120 | 120 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
121 | - require_once CALENDAR_ROOT . 'Week.php'; |
|
121 | + require_once CALENDAR_ROOT.'Week.php'; |
|
122 | 122 | $numWeeks = $this->tableHelper->getNumWeeks(); |
123 | 123 | for ($i = 1, $d = 1; $i <= $numWeeks; ++$i, $d += $this->cE->getDaysInWeek($this->thisYear(), $this->thisMonth(), $this->thisDay())) { |
124 | 124 | $this->children[$i] = new Calendar_Week($this->year, $this->month, $d, $this->tableHelper->getFirstDay()); |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Load base month. |
56 | 56 | */ |
57 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
57 | +require_once CALENDAR_ROOT.'Month.php'; |
|
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Represents a Month and builds Days in tabular form<br> |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function build($sDates = []) |
131 | 131 | { |
132 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
132 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
133 | 133 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
134 | 134 | Calendar_Month::build($sDates); |
135 | 135 | $this->buildEmptyDaysBefore(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | if (!$engine) { |
99 | 99 | if (!class_exists($class)) { |
100 | - require_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php'; |
|
100 | + require_once CALENDAR_ROOT.'Engine'.'/'.CALENDAR_ENGINE.'.php'; |
|
101 | 101 | } |
102 | 102 | $engine = new $class(); |
103 | 103 | } |
@@ -209,13 +209,13 @@ discard block |
||
209 | 209 | if (!isset($cE)) { |
210 | 210 | $cE = Calendar_Engine_Factory::getEngine(); |
211 | 211 | } |
212 | - $this->cE =& $cE; |
|
213 | - $this->year = (int)$y; |
|
214 | - $this->month = (int)$m; |
|
215 | - $this->day = (int)$d; |
|
216 | - $this->hour = (int)$h; |
|
217 | - $this->minute = (int)$i; |
|
218 | - $this->second = (int)$s; |
|
212 | + $this->cE = & $cE; |
|
213 | + $this->year = (int) $y; |
|
214 | + $this->month = (int) $m; |
|
215 | + $this->day = (int) $d; |
|
216 | + $this->hour = (int) $h; |
|
217 | + $this->minute = (int) $i; |
|
218 | + $this->second = (int) $s; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | return $this->toArray($stamp); |
332 | 332 | break; |
333 | 333 | case 'object': |
334 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
334 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
335 | 335 | |
336 | 336 | return Calendar_Factory::createByTimestamp($returnType, $stamp); |
337 | 337 | break; |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | */ |
354 | 354 | public function build($sDates = []) |
355 | 355 | { |
356 | - require_once __DIR__ . '/PEAR.php'; |
|
356 | + require_once __DIR__.'/PEAR.php'; |
|
357 | 357 | PEAR::raiseError('Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::build()'); |
358 | 358 | |
359 | 359 | return false; |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | */ |
370 | 370 | public function setSelection($sDates) |
371 | 371 | { |
372 | - require_once __DIR__ . '/PEAR.php'; |
|
372 | + require_once __DIR__.'/PEAR.php'; |
|
373 | 373 | PEAR::raiseError('Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::setSelection()'); |
374 | 374 | |
375 | 375 | return false; |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | public function &getValidator() |
437 | 437 | { |
438 | 438 | if (!isset($this->validator)) { |
439 | - require_once CALENDAR_ROOT . 'Validator.php'; |
|
439 | + require_once CALENDAR_ROOT.'Validator.php'; |
|
440 | 440 | $this->validator = new Calendar_Validator($this); |
441 | 441 | } |
442 | 442 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | { |
471 | 471 | if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) { |
472 | 472 | if (($firstDay != CALENDAR_FIRST_DAY_OF_WEEK) && !is_null($firstDay)) { |
473 | - $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' . ' The $firstDay parameter will be ignored.'; |
|
473 | + $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'.' The $firstDay parameter will be ignored.'; |
|
474 | 474 | trigger_error($msg, E_USER_WARNING); |
475 | 475 | } |
476 | 476 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Load Calendar base class. |
52 | 52 | */ |
53 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
53 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Represents a Week and builds Days in tabular format<br> |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function __construct($y, $m, $d, $firstDay = null) |
140 | 140 | { |
141 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
141 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
142 | 142 | parent::__construct($y, $m, $d); |
143 | 143 | $this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
144 | 144 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function build($sDates = []) |
172 | 172 | { |
173 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
173 | + require_once CALENDAR_ROOT.'Day.php'; |
|
174 | 174 | $year = $this->cE->stampToYear($this->thisWeek); |
175 | 175 | $month = $this->cE->stampToMonth($this->thisWeek); |
176 | 176 | $day = $this->cE->stampToDay($this->thisWeek); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | case 'array': |
295 | 295 | return $this->toArray($this->prevWeek); |
296 | 296 | case 'object': |
297 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
297 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
298 | 298 | |
299 | 299 | return Calendar_Factory::createByTimestamp('Week', $this->prevWeek); |
300 | 300 | case 'timestamp': |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | case 'array': |
329 | 329 | return $this->toArray($this->thisWeek); |
330 | 330 | case 'object': |
331 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
331 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
332 | 332 | |
333 | 333 | return Calendar_Factory::createByTimestamp('Week', $this->thisWeek); |
334 | 334 | case 'timestamp': |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | case 'array': |
356 | 356 | return $this->toArray($this->nextWeek); |
357 | 357 | case 'object': |
358 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
358 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
359 | 359 | |
360 | 360 | return Calendar_Factory::createByTimestamp('Week', $this->nextWeek); |
361 | 361 | case 'timestamp': |