@@ -34,8 +34,8 @@ |
||
34 | 34 | public function __construct($debug = false) |
35 | 35 | { |
36 | 36 | $this->debug = $debug; |
37 | - $moduleDirName = basename(dirname(__DIR__)); |
|
38 | - parent::__construct($moduleDirName); |
|
37 | + $moduleDirName = basename(dirname(__DIR__)); |
|
38 | + parent::__construct($moduleDirName); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function __construct($debug = false) |
35 | 35 | { |
36 | - $this->debug = $debug; |
|
36 | + $this->debug = $debug; |
|
37 | 37 | $moduleDirName = basename(dirname(__DIR__)); |
38 | 38 | parent::__construct($moduleDirName); |
39 | 39 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | $ret = false; |
74 | 74 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
75 | - $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
75 | + $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
76 | 76 | $ret = new $class($db); |
77 | 77 | return $ret; |
78 | 78 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | //Kraven 30 |
22 | 22 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
23 | 23 | |
24 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Class LocationHandler. |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | //require_once __DIR__ . '/config.php'; |
27 | 27 | //require_once __DIR__ . '/ExtDateTime.php'; |
28 | 28 | //require_once __DIR__ . '/utility.php'; |
29 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
29 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Class Event. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->initVar('event_location', XOBJ_DTYPE_INT, 5, false); |
68 | 68 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
69 | 69 | |
70 | - $this->externalKey['cat_id'] = [ |
|
70 | + $this->externalKey['cat_id'] = [ |
|
71 | 71 | 'className' => 'Category', |
72 | 72 | 'getMethodeName' => 'getCat', |
73 | 73 | 'keyName' => 'cat', |
@@ -43,9 +43,9 @@ |
||
43 | 43 | public function __construct() |
44 | 44 | { |
45 | 45 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
46 | - $moduleDirNameUpper = strtoupper($moduleDirName); |
|
46 | + $moduleDirNameUpper = strtoupper($moduleDirName); |
|
47 | 47 | |
48 | - require_once dirname(dirname(__DIR__)) . '/include/config.php'; |
|
48 | + require_once dirname(dirname(__DIR__)).'/include/config.php'; |
|
49 | 49 | $config = getConfig(); |
50 | 50 | |
51 | 51 | $this->name = $config->name; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
34 | 34 | } |
35 | 35 | |
36 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
36 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
37 | 37 | } |
38 | 38 | } catch (\Exception $e) { |
39 | 39 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | $dir = opendir($src); |
60 | 60 | // @mkdir($dst); |
61 | 61 | if (!@mkdir($dst) && !is_dir($dst)) { |
62 | - throw new \RuntimeException('The directory ' . $dst . ' could not be created.'); |
|
62 | + throw new \RuntimeException('The directory '.$dst.' could not be created.'); |
|
63 | 63 | } |
64 | 64 | while (false !== ($file = readdir($dir))) { |
65 | 65 | if (('.' !== $file) && ('..' !== $file)) { |
66 | - if (is_dir($src . '/' . $file)) { |
|
67 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
66 | + if (is_dir($src.'/'.$file)) { |
|
67 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
68 | 68 | } else { |
69 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
69 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | self::rrmdir($fObj->getPathname()); |
161 | 161 | } |
162 | 162 | } |
163 | - $iterator = null; // clear iterator Obj to close file/directory |
|
163 | + $iterator = null; // clear iterator Obj to close file/directory |
|
164 | 164 | return rmdir($src); // remove the directory & return results |
165 | 165 | } |
166 | 166 | |
@@ -193,14 +193,14 @@ discard block |
||
193 | 193 | $iterator = new \DirectoryIterator($src); |
194 | 194 | foreach ($iterator as $fObj) { |
195 | 195 | if ($fObj->isFile()) { |
196 | - rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
196 | + rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
197 | 197 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
198 | 198 | // Try recursively on directory |
199 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
199 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
200 | 200 | // rmdir($fObj->getPath()); // now delete the directory |
201 | 201 | } |
202 | 202 | } |
203 | - $iterator = null; // clear iterator Obj to close file/directory |
|
203 | + $iterator = null; // clear iterator Obj to close file/directory |
|
204 | 204 | return rmdir($src); // remove the directory & return results |
205 | 205 | } |
206 | 206 | |
@@ -236,9 +236,9 @@ discard block |
||
236 | 236 | $iterator = new \DirectoryIterator($src); |
237 | 237 | foreach ($iterator as $fObj) { |
238 | 238 | if ($fObj->isFile()) { |
239 | - copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
239 | + copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
240 | 240 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
241 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
241 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
242 | 242 | } |
243 | 243 | } |
244 | 244 | return true; |
@@ -1,27 +1,27 @@ |
||
1 | 1 | <?php |
2 | 2 | // |
3 | -if (!@require_once __DIR__ . '/Calendar/Calendar.php') { |
|
3 | +if (!@require_once __DIR__.'/Calendar/Calendar.php') { |
|
4 | 4 | @define('CALENDAR_ROOT', '../'); |
5 | 5 | } |
6 | -require_once CALENDAR_ROOT . 'Year.php'; |
|
7 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
8 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
9 | -require_once CALENDAR_ROOT . 'Week.php'; |
|
10 | -require_once CALENDAR_ROOT . 'Hour.php'; |
|
11 | -require_once CALENDAR_ROOT . 'Minute.php'; |
|
12 | -require_once CALENDAR_ROOT . 'Second.php'; |
|
13 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
14 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
15 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
16 | -require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
|
17 | -require_once CALENDAR_ROOT . 'Validator.php'; |
|
18 | -require_once CALENDAR_ROOT . 'Engine/Interface.php'; |
|
19 | -require_once CALENDAR_ROOT . 'Engine/UnixTs.php'; |
|
20 | -require_once CALENDAR_ROOT . 'Engine/PearDate.php'; |
|
21 | -require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
22 | -require_once CALENDAR_ROOT . 'Decorator/Textual.php'; |
|
23 | -require_once CALENDAR_ROOT . 'Decorator/Uri.php'; |
|
24 | -require_once CALENDAR_ROOT . 'Decorator/Weekday.php'; |
|
25 | -require_once CALENDAR_ROOT . 'Decorator/Wrapper.php'; |
|
26 | -require_once CALENDAR_ROOT . 'Util/Uri.php'; |
|
27 | -require_once CALENDAR_ROOT . 'Util/Textual.php'; |
|
6 | +require_once CALENDAR_ROOT.'Year.php'; |
|
7 | +require_once CALENDAR_ROOT.'Month.php'; |
|
8 | +require_once CALENDAR_ROOT.'Day.php'; |
|
9 | +require_once CALENDAR_ROOT.'Week.php'; |
|
10 | +require_once CALENDAR_ROOT.'Hour.php'; |
|
11 | +require_once CALENDAR_ROOT.'Minute.php'; |
|
12 | +require_once CALENDAR_ROOT.'Second.php'; |
|
13 | +require_once CALENDAR_ROOT.'Month.php'; |
|
14 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
15 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
16 | +require_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
17 | +require_once CALENDAR_ROOT.'Validator.php'; |
|
18 | +require_once CALENDAR_ROOT.'Engine/Interface.php'; |
|
19 | +require_once CALENDAR_ROOT.'Engine/UnixTs.php'; |
|
20 | +require_once CALENDAR_ROOT.'Engine/PearDate.php'; |
|
21 | +require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
22 | +require_once CALENDAR_ROOT.'Decorator/Textual.php'; |
|
23 | +require_once CALENDAR_ROOT.'Decorator/Uri.php'; |
|
24 | +require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
|
25 | +require_once CALENDAR_ROOT.'Decorator/Wrapper.php'; |
|
26 | +require_once CALENDAR_ROOT.'Util/Uri.php'; |
|
27 | +require_once CALENDAR_ROOT.'Util/Textual.php'; |
@@ -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 ((CALENDAR_FIRST_DAY_OF_WEEK != $firstDay) && 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 |
@@ -7,16 +7,16 @@ discard block |
||
7 | 7 | { |
8 | 8 | list($usec, $sec) = explode(' ', microtime()); |
9 | 9 | |
10 | - return (float)$usec + (float)$sec; |
|
10 | + return (float) $usec + (float) $sec; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | $start = getmicrotime(); |
14 | 14 | |
15 | -if (!@require_once __DIR__ . '/Calendar/Calendar.php') { |
|
15 | +if (!@require_once __DIR__.'/Calendar/Calendar.php') { |
|
16 | 16 | define('CALENDAR_ROOT', '../../'); |
17 | 17 | } |
18 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
19 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
18 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
19 | +require_once CALENDAR_ROOT.'Day.php'; |
|
20 | 20 | |
21 | 21 | if (!isset($_GET['y'])) { |
22 | 22 | $_GET['y'] = date('Y'); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | // Construct strings for next/previous links |
35 | 35 | $PMonth = $Month->prevMonth('object'); // Get previous month as object |
36 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
36 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
37 | 37 | $NMonth = $Month->nextMonth('object'); |
38 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
38 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
39 | 39 | ?> |
40 | 40 | <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
41 | 41 | <html> |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | while ($Day = $Month->fetch()) { |
111 | 111 | |
112 | 112 | // Build a link string for each day |
113 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); |
|
113 | + $link = $_SERVER['PHP_SELF'].'?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); |
|
114 | 114 | |
115 | 115 | // isFirst() to find start of week |
116 | 116 | if ($Day->isFirst()) { |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | if ($Day->isSelected()) { |
121 | - echo '<td class="selected">' . $Day->thisDay() . "</td>\n"; |
|
121 | + echo '<td class="selected">'.$Day->thisDay()."</td>\n"; |
|
122 | 122 | } elseif ($Day->isEmpty()) { |
123 | 123 | echo "<td> </td>\n"; |
124 | 124 | } else { |
125 | - echo '<td><a href="' . $link . '">' . $Day->thisDay() . "</a></td>\n"; |
|
125 | + echo '<td><a href="'.$link.'">'.$Day->thisDay()."</a></td>\n"; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | // isLast() to find end of week |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | </tr> |
143 | 143 | </table> |
144 | 144 | <?php |
145 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
145 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
146 | 146 | ?> |
147 | 147 | </body> |
148 | 148 | </html> |
@@ -2,11 +2,11 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Description: demonstrates using the Uri util. |
4 | 4 | */ |
5 | -if (!@require_once __DIR__ . '/Calendar/Calendar.php') { |
|
5 | +if (!@require_once __DIR__.'/Calendar/Calendar.php') { |
|
6 | 6 | define('CALENDAR_ROOT', '../../'); |
7 | 7 | } |
8 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
9 | -require_once CALENDAR_ROOT . 'Util/Uri.php'; |
|
8 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
9 | +require_once CALENDAR_ROOT.'Util/Uri.php'; |
|
10 | 10 | |
11 | 11 | if (!isset($_GET['jahr'])) { |
12 | 12 | $_GET['jahr'] = date('Y'); |
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | // Build the month |
19 | 19 | $Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
20 | 20 | |
21 | -echo '<p>The current month is ' . $Calendar->thisMonth() . ' of year ' . $Calendar->thisYear() . '</p>'; |
|
21 | +echo '<p>The current month is '.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'; |
|
22 | 22 | |
23 | 23 | $Uri = new Calendar_Util_Uri('jahr', 'monat'); |
24 | 24 | $Uri->setFragments('jahr', 'monat'); |
25 | 25 | |
26 | 26 | echo '"Vector" URIs<pre>'; |
27 | -echo "Previous Uri:\t" . htmlentities($Uri->prev($Calendar, 'month'), ENT_QUOTES | ENT_HTML5) . "\n"; |
|
28 | -echo "This Uri:\t" . htmlentities($Uri->this($Calendar, 'month'), ENT_QUOTES | ENT_HTML5) . "\n"; |
|
29 | -echo "Next Uri:\t" . htmlentities($Uri->next($Calendar, 'month'), ENT_QUOTES | ENT_HTML5) . "\n"; |
|
27 | +echo "Previous Uri:\t".htmlentities($Uri->prev($Calendar, 'month'), ENT_QUOTES | ENT_HTML5)."\n"; |
|
28 | +echo "This Uri:\t".htmlentities($Uri->this($Calendar, 'month'), ENT_QUOTES | ENT_HTML5)."\n"; |
|
29 | +echo "Next Uri:\t".htmlentities($Uri->next($Calendar, 'month'), ENT_QUOTES | ENT_HTML5)."\n"; |
|
30 | 30 | echo '</pre>'; |
31 | 31 | |
32 | 32 | // Switch to scalar URIs |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $Uri->scalar = true; // Omit variable names |
35 | 35 | |
36 | 36 | echo '"Scalar" URIs<pre>'; |
37 | -echo "Previous Uri:\t" . $Uri->prev($Calendar, 'month') . "\n"; |
|
38 | -echo "This Uri:\t" . $Uri->this($Calendar, 'month') . "\n"; |
|
39 | -echo "Next Uri:\t" . $Uri->next($Calendar, 'month') . "\n"; |
|
37 | +echo "Previous Uri:\t".$Uri->prev($Calendar, 'month')."\n"; |
|
38 | +echo "This Uri:\t".$Uri->this($Calendar, 'month')."\n"; |
|
39 | +echo "Next Uri:\t".$Uri->next($Calendar, 'month')."\n"; |
|
40 | 40 | echo '</pre>'; |
41 | 41 | |
42 | 42 | // Restore the vector URIs |
@@ -44,6 +44,6 @@ discard block |
||
44 | 44 | $Uri->scalar = false; |
45 | 45 | ?> |
46 | 46 | <p> |
47 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->prev($Calendar, 'month'); ?>">Prev</a> : |
|
48 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->next($Calendar, 'month'); ?>">Next</a> |
|
47 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->prev($Calendar, 'month'); ?>">Prev</a> : |
|
48 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->next($Calendar, 'month'); ?>">Next</a> |
|
49 | 49 | </p> |