@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
| 4 | 4 | |
| 5 | -require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php'; |
|
| 5 | +require_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php'; |
|
| 6 | 6 | |
| 7 | 7 | $moduleDirName = basename(dirname(__DIR__)); |
| 8 | 8 | xoops_loadLanguage('main', $moduleDirName); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getFormatedDate($format, $timestamp) |
| 92 | 92 | { |
| 93 | - $patterns = [ |
|
| 93 | + $patterns = [ |
|
| 94 | 94 | '/January/', |
| 95 | 95 | '/February/', |
| 96 | 96 | '/March/', |
@@ -143,18 +143,18 @@ discard block |
||
| 143 | 143 | _CAL_OCTOBER, |
| 144 | 144 | _CAL_NOVEMBER, |
| 145 | 145 | _CAL_DECEMBER, |
| 146 | - substr(_CAL_JANUARY, 0, 3) . ' ', |
|
| 147 | - substr(_CAL_FEBRUARY, 0, 3) . ' ', |
|
| 148 | - substr(_CAL_MARCH, 0, 3) . ' ', |
|
| 149 | - substr(_CAL_APRIL, 0, 3) . ' ', |
|
| 150 | - substr(_CAL_MAY, 0, 3) . ' ', |
|
| 151 | - substr(_CAL_JUNE, 0, 3) . ' ', |
|
| 152 | - substr(_CAL_JULY, 0, 3) . ' ', |
|
| 153 | - substr(_CAL_AUGUST, 0, 3) . ' ', |
|
| 154 | - substr(_CAL_SEPTEMBER, 0, 3) . ' ', |
|
| 155 | - substr(_CAL_OCTOBER, 0, 3) . ' ', |
|
| 156 | - substr(_CAL_NOVEMBER, 0, 3) . ' ', |
|
| 157 | - substr(_CAL_DECEMBER, 0, 3) . ' ', |
|
| 146 | + substr(_CAL_JANUARY, 0, 3).' ', |
|
| 147 | + substr(_CAL_FEBRUARY, 0, 3).' ', |
|
| 148 | + substr(_CAL_MARCH, 0, 3).' ', |
|
| 149 | + substr(_CAL_APRIL, 0, 3).' ', |
|
| 150 | + substr(_CAL_MAY, 0, 3).' ', |
|
| 151 | + substr(_CAL_JUNE, 0, 3).' ', |
|
| 152 | + substr(_CAL_JULY, 0, 3).' ', |
|
| 153 | + substr(_CAL_AUGUST, 0, 3).' ', |
|
| 154 | + substr(_CAL_SEPTEMBER, 0, 3).' ', |
|
| 155 | + substr(_CAL_OCTOBER, 0, 3).' ', |
|
| 156 | + substr(_CAL_NOVEMBER, 0, 3).' ', |
|
| 157 | + substr(_CAL_DECEMBER, 0, 3).' ', |
|
| 158 | 158 | _CAL_SUNDAY, |
| 159 | 159 | _CAL_MONDAY, |
| 160 | 160 | _CAL_TUESDAY, |
@@ -162,13 +162,13 @@ discard block |
||
| 162 | 162 | _CAL_THURSDAY, |
| 163 | 163 | _CAL_FRIDAY, |
| 164 | 164 | _CAL_SATURDAY, |
| 165 | - substr(_CAL_SUNDAY, 0, 3) . ' ', |
|
| 166 | - substr(_CAL_MONDAY, 0, 3) . ' ', |
|
| 167 | - substr(_CAL_TUESDAY, 0, 3) . ' ', |
|
| 168 | - substr(_CAL_WEDNESDAY, 0, 3) . ' ', |
|
| 169 | - substr(_CAL_THURSDAY, 0, 3) . ' ', |
|
| 170 | - substr(_CAL_FRIDAY, 0, 3) . ' ', |
|
| 171 | - substr(_CAL_SATURDAY, 0, 3) . ' ', |
|
| 165 | + substr(_CAL_SUNDAY, 0, 3).' ', |
|
| 166 | + substr(_CAL_MONDAY, 0, 3).' ', |
|
| 167 | + substr(_CAL_TUESDAY, 0, 3).' ', |
|
| 168 | + substr(_CAL_WEDNESDAY, 0, 3).' ', |
|
| 169 | + substr(_CAL_THURSDAY, 0, 3).' ', |
|
| 170 | + substr(_CAL_FRIDAY, 0, 3).' ', |
|
| 171 | + substr(_CAL_SATURDAY, 0, 3).' ', |
|
| 172 | 172 | ]; |
| 173 | 173 | |
| 174 | 174 | return preg_replace($patterns, $replacements, date($format, $timestamp)); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | array_shift($eventOptions); |
| 211 | 211 | $day = ''; |
| 212 | 212 | foreach ($eventOptions as $option) { |
| 213 | - $day .= ' ' . $daysName[$option] . ', '; |
|
| 213 | + $day .= ' '.$daysName[$option].', '; |
|
| 214 | 214 | } |
| 215 | 215 | $ret = sprintf(_MD_EXTCAL_RR_WEEKLY, $day, $interval); |
| 216 | 216 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | array_shift($eventOptions); |
| 330 | 330 | $month = ''; |
| 331 | 331 | foreach ($eventOptions as $option) { |
| 332 | - $month .= ' ' . $monthName[$option] . ', '; |
|
| 332 | + $month .= ' '.$monthName[$option].', '; |
|
| 333 | 333 | } |
| 334 | 334 | $dayString = $day; |
| 335 | 335 | if (array_key_exists($day, $monthDays)) { |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 23 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Class ExtcalFile. |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
| 69 | 69 | |
| 70 | 70 | $allowedMimeType = []; |
| 71 | - $mimeType = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php'; |
|
| 71 | + $mimeType = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php'; |
|
| 72 | 72 | foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) { |
| 73 | 73 | $allowedMimeType[] = $mimeType[$fileExt]; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728); |
|
| 77 | - $uploader->setPrefix($userId . '-' . $eventId . '_'); |
|
| 76 | + $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728); |
|
| 77 | + $uploader->setPrefix($userId.'-'.$eventId.'_'); |
|
| 78 | 78 | if ($uploader->fetchMedia('event_file')) { |
| 79 | 79 | if (!$uploader->upload()) { |
| 80 | 80 | return false; |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | if (isset($_POST['filetokeep'])) { |
| 136 | 136 | if (is_array($_POST['filetokeep'])) { |
| 137 | 137 | $count = count($_POST['filetokeep']); |
| 138 | - $in = '(' . $_POST['filetokeep'][0]; |
|
| 138 | + $in = '('.$_POST['filetokeep'][0]; |
|
| 139 | 139 | array_shift($_POST['filetokeep']); |
| 140 | 140 | foreach ($_POST['filetokeep'] as $elmt) { |
| 141 | - $in .= ',' . $elmt; |
|
| 141 | + $in .= ','.$elmt; |
|
| 142 | 142 | } |
| 143 | 143 | $in .= ')'; |
| 144 | 144 | } else { |
| 145 | - $in = '(' . $_POST['filetokeep'] . ')'; |
|
| 145 | + $in = '('.$_POST['filetokeep'].')'; |
|
| 146 | 146 | } |
| 147 | 147 | $criteria->add(new Criteria('file_id', $in, 'NOT IN')); |
| 148 | 148 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public function formatFileSize(&$file) |
| 180 | 180 | { |
| 181 | 181 | if ($file['file_size'] > 1000) { |
| 182 | - $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb'; |
|
| 182 | + $file['formated_file_size'] = round($file['file_size'] / 1000).'kb'; |
|
| 183 | 183 | } else { |
| 184 | 184 | $file['formated_file_size'] = '1kb'; |
| 185 | 185 | } |
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function _deleteFile(&$file) |
| 192 | 192 | { |
| 193 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) { |
|
| 194 | - unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name')); |
|
| 193 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) { |
|
| 194 | + unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name')); |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Class ExtcalEventNotMember. |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | $eventNotMember = $this->getObjects(new Criteria('event_id', $eventId)); |
| 86 | 86 | $count = count($eventNotMember); |
| 87 | 87 | if ($count > 0) { |
| 88 | - $in = '(' . $eventNotMember[0]->getVar('uid'); |
|
| 88 | + $in = '('.$eventNotMember[0]->getVar('uid'); |
|
| 89 | 89 | array_shift($eventNotMember); |
| 90 | 90 | foreach ($eventNotMember as $member) { |
| 91 | - $in .= ',' . $member->getVar('uid'); |
|
| 91 | + $in .= ','.$member->getVar('uid'); |
|
| 92 | 92 | } |
| 93 | - $in .= ')'; |
|
| 93 | + $in .= ')'; |
|
| 94 | 94 | $criteria = new Criteria('uid', $in, 'IN'); |
| 95 | 95 | } else { |
| 96 | 96 | $criteria = new Criteria('uid', '(0)', 'IN'); |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
| 23 | -require_once __DIR__ . '/perm.php'; |
|
| 24 | -require_once __DIR__ . '/time.php'; |
|
| 22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
| 23 | +require_once __DIR__.'/perm.php'; |
|
| 24 | +require_once __DIR__.'/time.php'; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * Class ExtcalCat. |
@@ -203,10 +203,10 @@ discard block |
||
| 203 | 203 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 204 | 204 | $count = count($authorizedAccessCats); |
| 205 | 205 | if ($count > 0) { |
| 206 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 206 | + $in = '('.$authorizedAccessCats[0]; |
|
| 207 | 207 | array_shift($authorizedAccessCats); |
| 208 | 208 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 209 | - $in .= ',' . $authorizedAccessCat; |
|
| 209 | + $in .= ','.$authorizedAccessCat; |
|
| 210 | 210 | } |
| 211 | 211 | $in .= ')'; |
| 212 | 212 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -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 an Hour and builds Minutes |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function build($sDates = []) |
| 96 | 96 | { |
| 97 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
| 97 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
| 98 | 98 | $mIH = $this->cE->getMinutesInHour($this->year, $this->month, $this->day, $this->hour); |
| 99 | 99 | for ($i = 0; $i < $mIH; ++$i) { |
| 100 | 100 | $this->children[$i] = new Calendar_Minute($this->year, $this->month, $this->day, $this->hour, $i); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth() |
| 119 | 119 | && $this->day == $sDate->thisDay() |
| 120 | 120 | && $this->hour == $sDate->thisHour()) { |
| 121 | - $key = (int)$sDate->thisMinute(); |
|
| 121 | + $key = (int) $sDate->thisMinute(); |
|
| 122 | 122 | if (isset($this->children[$key])) { |
| 123 | 123 | $sDate->setSelected(); |
| 124 | 124 | $this->children[$key] = $sDate; |
@@ -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 | } |
@@ -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 | |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function build($events = []) |
| 78 | 78 | { |
| 79 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
| 80 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
| 79 | + require_once CALENDAR_ROOT.'Day.php'; |
|
| 80 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
| 81 | 81 | |
| 82 | 82 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
| 83 | 83 | $this->cE = $this->getEngine(); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | <h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
| 231 | 231 | <table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
| 232 | 232 | <caption> |
| 233 | - <?php echo $MonthDecorator->thisMonth() . ' / ' . $MonthDecorator->thisYear(); ?> |
|
| 233 | + <?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
|
| 234 | 234 | </caption> |
| 235 | 235 | <tr> |
| 236 | 236 | <th>Monday</th> |
@@ -254,14 +254,14 @@ discard block |
||
| 254 | 254 | echo ' calCellEmpty'; |
| 255 | 255 | } |
| 256 | 256 | echo '">'; |
| 257 | - echo '<div class="dayNumber">' . $Day->thisDay() . '</div>'; |
|
| 257 | + echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
|
| 258 | 258 | |
| 259 | 259 | if ($Day->isEmpty()) { |
| 260 | 260 | echo ' '; |
| 261 | 261 | } else { |
| 262 | 262 | echo '<div class="dayContents"><ul>'; |
| 263 | 263 | while ($entry = $Day->getEntry()) { |
| 264 | - echo '<li>' . $entry['desc'] . '</li>'; |
|
| 264 | + echo '<li>'.$entry['desc'].'</li>'; |
|
| 265 | 265 | //you can print the time range as well |
| 266 | 266 | } |
| 267 | 267 | echo '</ul></div>'; |
@@ -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 | } |