@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * Returns the date as an associative array (helper method) |
| 147 | 147 | * |
| 148 | - * @param mixed $stamp timestamp (leave empty for current timestamp) |
|
| 148 | + * @param integer $stamp timestamp (leave empty for current timestamp) |
|
| 149 | 149 | * |
| 150 | 150 | * @return array |
| 151 | 151 | * @access public |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | * |
| 266 | 266 | * @param array $sDates array containing Calendar objects to select (optional) |
| 267 | 267 | * |
| 268 | - * @return boolean |
|
| 268 | + * @return boolean|null |
|
| 269 | 269 | * @access public |
| 270 | 270 | * @abstract |
| 271 | 271 | */ |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function __construct(&$calendar) |
| 80 | 80 | { |
| 81 | - $this->calendar =& $calendar; |
|
| 81 | + $this->calendar = & $calendar; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | return $this->calendar->prevWeek($format); |
| 442 | 442 | } else { |
| 443 | 443 | include_once 'PEAR.php'; |
| 444 | - PEAR::raiseError('Cannot call prevWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::prevWeek()'); |
|
| 444 | + PEAR::raiseError('Cannot call prevWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::prevWeek()'); |
|
| 445 | 445 | |
| 446 | 446 | return false; |
| 447 | 447 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | return $this->calendar->thisWeek($format); |
| 462 | 462 | } else { |
| 463 | 463 | include_once 'PEAR.php'; |
| 464 | - PEAR::raiseError('Cannot call thisWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::thisWeek()'); |
|
| 464 | + PEAR::raiseError('Cannot call thisWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::thisWeek()'); |
|
| 465 | 465 | |
| 466 | 466 | return false; |
| 467 | 467 | } |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | return $this->calendar->nextWeek($format); |
| 482 | 482 | } else { |
| 483 | 483 | include_once 'PEAR.php'; |
| 484 | - PEAR::raiseError('Cannot call thisWeek on Calendar object of type: ' . get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::nextWeek()'); |
|
| 484 | + PEAR::raiseError('Cannot call thisWeek on Calendar object of type: '.get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar_Decorator::nextWeek()'); |
|
| 485 | 485 | |
| 486 | 486 | return false; |
| 487 | 487 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public $entry; |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * @param $calendar |
|
| 22 | + * @param Calendar_Day $calendar |
|
| 23 | 23 | */ |
| 24 | 24 | public function __construct($calendar) |
| 25 | 25 | { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * @return mixed |
|
| 38 | + * @return boolean |
|
| 39 | 39 | */ |
| 40 | 40 | public function getEntry() |
| 41 | 41 | { |
@@ -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 | /** |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | FROM |
| 54 | 54 | diary |
| 55 | 55 | WHERE |
| 56 | - eventtime >= '" . $Day->thisDay(true) . "' |
|
| 56 | + eventtime >= '" . $Day->thisDay(true)."' |
|
| 57 | 57 | AND |
| 58 | - eventtime < '" . $Day->nextDay(true) . "';"; |
|
| 58 | + eventtime < '" . $Day->nextDay(true)."';"; |
|
| 59 | 59 | |
| 60 | 60 | // An array simulating data from a database |
| 61 | 61 | $result = array( |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | // If the hour is selected, call the decorator method... |
| 111 | 111 | if ($Hour->isSelected()) { |
| 112 | - echo("<td bgcolor=\"silver\">" . $Hour->getEntry() . "</td>\n"); |
|
| 112 | + echo("<td bgcolor=\"silver\">".$Hour->getEntry()."</td>\n"); |
|
| 113 | 113 | } else { |
| 114 | 114 | echo("<td> </td>\n"); |
| 115 | 115 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | var $entries = array(); |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * @param $calendar |
|
| 27 | + * @param Calendar_Day $calendar |
|
| 28 | 28 | */ |
| 29 | 29 | function DiaryEvent($calendar) |
| 30 | 30 | { |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | define('CALENDAR_ROOT', '../../'); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 15 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 16 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
| 14 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 15 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 16 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
| 17 | 17 | |
| 18 | 18 | // accepts multiple entries |
| 19 | 19 | /** |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function build($events = array()) |
| 77 | 77 | { |
| 78 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
| 79 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
| 78 | + require_once CALENDAR_ROOT.'Day.php'; |
|
| 79 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
| 80 | 80 | |
| 81 | 81 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
| 82 | 82 | $this->cE = $this->getEngine(); |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | <h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
| 224 | 224 | <table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
| 225 | 225 | <caption> |
| 226 | - <?php echo $MonthDecorator->thisMonth() . ' / ' . $MonthDecorator->thisYear(); ?> |
|
| 226 | + <?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
|
| 227 | 227 | </caption> |
| 228 | 228 | <tr> |
| 229 | 229 | <th>Monday</th> |
@@ -247,14 +247,14 @@ discard block |
||
| 247 | 247 | echo ' calCellEmpty'; |
| 248 | 248 | } |
| 249 | 249 | echo '">'; |
| 250 | - echo '<div class="dayNumber">' . $Day->thisDay() . '</div>'; |
|
| 250 | + echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
|
| 251 | 251 | |
| 252 | 252 | if ($Day->isEmpty()) { |
| 253 | 253 | echo ' '; |
| 254 | 254 | } else { |
| 255 | 255 | echo '<div class="dayContents"><ul>'; |
| 256 | 256 | while ($entry = $Day->getEntry()) { |
| 257 | - echo '<li>' . $entry['desc'] . '</li>'; |
|
| 257 | + echo '<li>'.$entry['desc'].'</li>'; |
|
| 258 | 258 | //you can print the time range as well |
| 259 | 259 | } |
| 260 | 260 | echo '</ul></div>'; |
@@ -367,7 +367,7 @@ |
||
| 367 | 367 | * |
| 368 | 368 | * @param int timestamp (depending on implementation) |
| 369 | 369 | * |
| 370 | - * @return boolean |
|
| 370 | + * @return boolean|null |
|
| 371 | 371 | * @access protected |
| 372 | 372 | */ |
| 373 | 373 | function isToday($stamp) |
@@ -200,6 +200,9 @@ discard block |
||
| 200 | 200 | * @param int &$h hour (13) |
| 201 | 201 | * @param int &$i minute (34) |
| 202 | 202 | * @param int &$s second (53) |
| 203 | + * @param integer $y |
|
| 204 | + * @param integer $m |
|
| 205 | + * @param integer $d |
|
| 203 | 206 | * |
| 204 | 207 | * @return void |
| 205 | 208 | * @access protected |
@@ -425,7 +428,7 @@ discard block |
||
| 425 | 428 | * @param int $m month (9) |
| 426 | 429 | * @param int $d day (4) |
| 427 | 430 | * |
| 428 | - * @return array (0, 1, 2, 3, 4, 5, 6) 1 = Monday |
|
| 431 | + * @return integer[] (0, 1, 2, 3, 4, 5, 6) 1 = Monday |
|
| 429 | 432 | * @access protected |
| 430 | 433 | */ |
| 431 | 434 | function getWeekDays($y=null, $m=null, $d=null) |
@@ -499,7 +502,7 @@ discard block |
||
| 499 | 502 | /** |
| 500 | 503 | * Checks if the given day is the current day |
| 501 | 504 | * |
| 502 | - * @param mixed $stamp Any timestamp format recognized by Pear::Date |
|
| 505 | + * @param string $stamp Any timestamp format recognized by Pear::Date |
|
| 503 | 506 | * |
| 504 | 507 | * @return boolean |
| 505 | 508 | * @access protected |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 89 | 89 | |
| 90 | - return (int)$date->year; |
|
| 90 | + return (int) $date->year; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 104 | 104 | |
| 105 | - return (int)$date->month; |
|
| 105 | + return (int) $date->month; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | { |
| 118 | 118 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 119 | 119 | |
| 120 | - return (int)$date->day; |
|
| 120 | + return (int) $date->day; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | { |
| 133 | 133 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 134 | 134 | |
| 135 | - return (int)$date->hour; |
|
| 135 | + return (int) $date->hour; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | { |
| 148 | 148 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 149 | 149 | |
| 150 | - return (int)$date->minute; |
|
| 150 | + return (int) $date->minute; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | { |
| 163 | 163 | $date = Calendar_Engine_PearDate::stampCollection($stamp); |
| 164 | 164 | |
| 165 | - return (int)$date->second; |
|
| 165 | + return (int) $date->second; |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | { |
| 183 | 183 | $r = array(); |
| 184 | 184 | Calendar_Engine_PearDate::adjustDate($y, $m, $d, $h, $i, $s); |
| 185 | - $key = $y . $m . $d . $h . $i . $s; |
|
| 185 | + $key = $y.$m.$d.$h.$i.$s; |
|
| 186 | 186 | if (!isset($r[$key])) { |
| 187 | 187 | $r[$key] = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $y, $m, $d, $h, $i, $s); |
| 188 | 188 | } |
@@ -229,8 +229,8 @@ discard block |
||
| 229 | 229 | $d += floor($h / 24); |
| 230 | 230 | $h %= 24; |
| 231 | 231 | } |
| 232 | - for (; $m < 1; $y--, $m += 12) ; |
|
| 233 | - for (; $m > 12; $y++, $m -= 12) ; |
|
| 232 | + for (; $m < 1; $y--, $m += 12); |
|
| 233 | + for (; $m > 12; $y++, $m -= 12); |
|
| 234 | 234 | |
| 235 | 235 | while ($d < 1) { |
| 236 | 236 | if ($m > 1) { |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | */ |
| 299 | 299 | public function getDaysInMonth($y, $m) |
| 300 | 300 | { |
| 301 | - return (int)Date_Calc::daysInMonth($m, $y); |
|
| 301 | + return (int) Date_Calc::daysInMonth($m, $y); |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | public function getFirstDayInMonth($y, $m) |
| 315 | 315 | { |
| 316 | - return (int)Date_Calc::dayOfWeek(1, $m, $y); |
|
| 316 | + return (int) Date_Calc::dayOfWeek(1, $m, $y); |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | public function getWeekNInMonth($y, $m, $d, $firstDay = 1) |
| 364 | 364 | { |
| 365 | 365 | $weekEnd = ($firstDay == 0) ? $this->getDaysInWeek() - 1 : $firstDay - 1; |
| 366 | - $end_of_week = (int)Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true); |
|
| 366 | + $end_of_week = (int) Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true); |
|
| 367 | 367 | $w = 1; |
| 368 | 368 | while ($d > $end_of_week) { |
| 369 | 369 | ++$w; |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | } |
| 399 | 399 | $daysInTheFirstWeek %= $this->getDaysInWeek(); |
| 400 | 400 | |
| 401 | - return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks); |
|
| 401 | + return (int) (ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks); |
|
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | /** |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | * @param int $m month (9) |
| 382 | 382 | * @param int $d day (4) |
| 383 | 383 | * |
| 384 | - * @return array (0,1,2,3,4,5,6) 1 = Monday |
|
| 384 | + * @return integer[] (0,1,2,3,4,5,6) 1 = Monday |
|
| 385 | 385 | * @access protected |
| 386 | 386 | */ |
| 387 | 387 | function getWeekDays($y=null, $m=null, $d=null) |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | /** |
| 456 | 456 | * Checks if the given day is the current day |
| 457 | 457 | * |
| 458 | - * @param mixed $stamp Any timestamp format recognized by Pear::Date |
|
| 458 | + * @param integer $stamp Any timestamp format recognized by Pear::Date |
|
| 459 | 459 | * |
| 460 | 460 | * @return boolean |
| 461 | 461 | * @access protected |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 98 | 98 | |
| 99 | - return (int)$date[0]; |
|
| 99 | + return (int) $date[0]; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 113 | 113 | |
| 114 | - return (int)$date[1]; |
|
| 114 | + return (int) $date[1]; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 128 | 128 | |
| 129 | - return (int)$date[2]; |
|
| 129 | + return (int) $date[2]; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | { |
| 142 | 142 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 143 | 143 | |
| 144 | - return (int)$date[3]; |
|
| 144 | + return (int) $date[3]; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 158 | 158 | |
| 159 | - return (int)$date[4]; |
|
| 159 | + return (int) $date[4]; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | { |
| 172 | 172 | $date = Calendar_Engine_UnixTS::stampCollection($stamp); |
| 173 | 173 | |
| 174 | - return (int)$date[5]; |
|
| 174 | + return (int) $date[5]; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | } |
| 353 | 353 | $daysInTheFirstWeek %= $this->getDaysInWeek(); |
| 354 | 354 | |
| 355 | - return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks); |
|
| 355 | + return (int) (ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | /** |
| 198 | 198 | * Returns the first day of the month |
| 199 | 199 | * |
| 200 | - * @return int |
|
| 200 | + * @return string |
|
| 201 | 201 | * @access protected |
| 202 | 202 | * @see Calendar_Engine_Interface::getFirstDayOfWeek() |
| 203 | 203 | */ |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | /** |
| 130 | 130 | * Gets the URI string for the previous calendar unit |
| 131 | 131 | * |
| 132 | - * @param object $Calendar subclassed from Calendar e.g. Calendar_Month |
|
| 132 | + * @param Calendar_Decorator_Uri $Calendar subclassed from Calendar e.g. Calendar_Month |
|
| 133 | 133 | * @param string $unit calendar unit (year|month|week|day|hour|minute|second) |
| 134 | 134 | * |
| 135 | 135 | * @return string |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | /** |
| 164 | 164 | * Gets the URI string for the next calendar unit |
| 165 | 165 | * |
| 166 | - * @param object $Calendar subclassed from Calendar e.g. Calendar_Month |
|
| 166 | + * @param Calendar_Decorator_Uri $Calendar subclassed from Calendar e.g. Calendar_Month |
|
| 167 | 167 | * @param string $unit calendar unit (year|month|week|day|hour|minute|second) |
| 168 | 168 | * |
| 169 | 169 | * @return string |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function prev($Calendar, $unit) |
| 151 | 151 | { |
| 152 | - $method = 'prev' . $unit; |
|
| 152 | + $method = 'prev'.$unit; |
|
| 153 | 153 | $stamp = $Calendar->{$method}('timestamp'); |
| 154 | 154 | |
| 155 | 155 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function this($Calendar, $unit) |
| 168 | 168 | { |
| 169 | - $method = 'this' . $unit; |
|
| 169 | + $method = 'this'.$unit; |
|
| 170 | 170 | $stamp = $Calendar->{$method}('timestamp'); |
| 171 | 171 | |
| 172 | 172 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function next($Calendar, $unit) |
| 185 | 185 | { |
| 186 | - $method = 'next' . $unit; |
|
| 186 | + $method = 'next'.$unit; |
|
| 187 | 187 | $stamp = $Calendar->{$method}('timestamp'); |
| 188 | 188 | |
| 189 | 189 | return $this->buildUriString($Calendar, $method, $stamp); |
@@ -205,10 +205,10 @@ discard block |
||
| 205 | 205 | $cE = $Calendar->getEngine(); |
| 206 | 206 | $separator = ''; |
| 207 | 207 | foreach ($this->uris as $unit => $uri) { |
| 208 | - $call = 'stampTo' . $unit; |
|
| 208 | + $call = 'stampTo'.$unit; |
|
| 209 | 209 | $uriString .= $separator; |
| 210 | 210 | if (!$this->scalar) { |
| 211 | - $uriString .= $uri . '='; |
|
| 211 | + $uriString .= $uri.'='; |
|
| 212 | 212 | } |
| 213 | 213 | $uriString .= $cE->{$call}($stamp); |
| 214 | 214 | $separator = $this->separator; |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * |
| 44 | 44 | * @internal param bool $encode To sanitizer the text? |
| 45 | 45 | * |
| 46 | - * @return array array of name/value pairs assigned to form elements |
|
| 46 | + * @return boolean array of name/value pairs assigned to form elements |
|
| 47 | 47 | */ |
| 48 | 48 | function getAddBaliseTable() |
| 49 | 49 | { |
@@ -56,13 +56,13 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function insertBreak($extra = '', $class = '') |
| 58 | 58 | { |
| 59 | - $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : ''; |
|
| 59 | + $class = ($class != '') ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : ''; |
|
| 60 | 60 | // Fix for $extra tag not showing |
| 61 | 61 | if ($extra) { |
| 62 | - $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>'; |
|
| 62 | + $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>'; |
|
| 63 | 63 | $this->addElement($extra); |
| 64 | 64 | } else { |
| 65 | - $extra = '<tr><td colspan="2" ' . $class . '> </td></tr>'; |
|
| 65 | + $extra = '<tr><td colspan="2" '.$class.'> </td></tr>'; |
|
| 66 | 66 | $this->addElement($extra); |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if ($title <> '') { |
| 95 | - $ret .= '<tr><th colspan="2">' . $title . '</th></tr>'; |
|
| 95 | + $ret .= '<tr><th colspan="2">'.$title.'</th></tr>'; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $hidden = ''; |
@@ -104,24 +104,24 @@ discard block |
||
| 104 | 104 | if (!$ele->getNocolspan()) { |
| 105 | 105 | $ret .= '<tr valign="top" align="left"><td class="head">'; |
| 106 | 106 | if (($caption = $ele->getCaption()) != '') { |
| 107 | - $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">'; |
|
| 108 | - $ret .= '<span class="caption-text">' . $caption . '</span>'; |
|
| 107 | + $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">'; |
|
| 108 | + $ret .= '<span class="caption-text">'.$caption.'</span>'; |
|
| 109 | 109 | $ret .= '<span class="caption-marker">*</span>'; |
| 110 | 110 | $ret .= '</div>'; |
| 111 | 111 | } |
| 112 | 112 | if (($desc = $ele->getDescription()) != '') { |
| 113 | - $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>'; |
|
| 113 | + $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>'; |
|
| 114 | 114 | } |
| 115 | - $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE; |
|
| 115 | + $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE; |
|
| 116 | 116 | } else { |
| 117 | 117 | $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">'; |
| 118 | 118 | if (($caption = $ele->getCaption()) != '') { |
| 119 | - $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">'; |
|
| 120 | - $ret .= '<span class="caption-text">' . $caption . '</span>'; |
|
| 119 | + $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">'; |
|
| 120 | + $ret .= '<span class="caption-text">'.$caption.'</span>'; |
|
| 121 | 121 | $ret .= '<span class="caption-marker">*</span>'; |
| 122 | 122 | $ret .= '</div>'; |
| 123 | 123 | } |
| 124 | - $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>'; |
|
| 124 | + $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>'; |
|
| 125 | 125 | } |
| 126 | 126 | } else { |
| 127 | 127 | $hidden .= $ele->render(); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $ret .= '</table>'; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - $ret .= NWLINE . ' ' . $hidden . NWLINE; |
|
| 135 | + $ret .= NWLINE.' '.$hidden.NWLINE; |
|
| 136 | 136 | |
| 137 | 137 | return $ret; |
| 138 | 138 | } |