Passed
Push — master ( 66eec6...f2a2b5 )
by Michael
02:23
created
class/Event.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/calendar_include.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
class/pear/Calendar/Calendar.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/3.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>&nbsp;</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
 block discarded – undo
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>
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/22.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/9.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 /**
3 3
  * Description: simple example on i18N.
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 . 'Day.php';
8
+require_once CALENDAR_ROOT.'Day.php';
9 9
 
10 10
 $Day = new Calendar_Day(2003, 10, 23);
11 11
 
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/21.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@  discard block
 block discarded – undo
6 6
 {
7 7
     list($usec, $sec) = explode(' ', microtime());
8 8
 
9
-    return (float)$usec + (float)$sec;
9
+    return (float) $usec + (float) $sec;
10 10
 }
11 11
 
12 12
 $start = getmicrotime();
13 13
 
14
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
14
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
15 15
     define('CALENDAR_ROOT', '../../');
16 16
 }
17 17
 
18
-require_once CALENDAR_ROOT . 'Year.php';
19
-require_once CALENDAR_ROOT . 'Month/Weeks.php';
18
+require_once CALENDAR_ROOT.'Year.php';
19
+require_once CALENDAR_ROOT.'Month/Weeks.php';
20 20
 
21 21
 define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH_WEEKS);
22 22
 
@@ -124,20 +124,20 @@  discard block
 block discarded – undo
124 124
         }
125 125
 
126 126
         echo "<td>\n<table class=\"month\">\n";
127
-        echo '<caption class="month">' . date('F', $Month->thisMonth(true)) . '</caption>';
128
-        echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>' . "\n";
127
+        echo '<caption class="month">'.date('F', $Month->thisMonth(true)).'</caption>';
128
+        echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>'."\n";
129 129
         echo "<tr>\n<th>Week</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>";
130 130
         $Month->build();
131 131
         while ($Week = $Month->fetch()) {
132 132
             echo "<tr>\n";
133
-            echo '<td>' . $Week->thisWeek($_GET['week_type']) . "</td>\n";
133
+            echo '<td>'.$Week->thisWeek($_GET['week_type'])."</td>\n";
134 134
             $Week->build();
135 135
 
136 136
             while ($Day = $Week->fetch()) {
137 137
                 if ($Day->isEmpty()) {
138 138
                     echo "<td>&nbsp;</td>\n";
139 139
                 } else {
140
-                    echo '<td>' . $Day->thisDay() . "</td>\n";
140
+                    echo '<td>'.$Day->thisDay()."</td>\n";
141 141
                 }
142 142
             }
143 143
         }
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/5.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  discard block
 block discarded – undo
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 . 'Year.php';
19
-require_once CALENDAR_ROOT . 'Month.php';
20
-require_once CALENDAR_ROOT . 'Day.php';
21
-require_once CALENDAR_ROOT . 'Hour.php';
22
-require_once CALENDAR_ROOT . 'Minute.php';
23
-require_once CALENDAR_ROOT . 'Second.php';
18
+require_once CALENDAR_ROOT.'Year.php';
19
+require_once CALENDAR_ROOT.'Month.php';
20
+require_once CALENDAR_ROOT.'Day.php';
21
+require_once CALENDAR_ROOT.'Hour.php';
22
+require_once CALENDAR_ROOT.'Minute.php';
23
+require_once CALENDAR_ROOT.'Second.php';
24 24
 
25 25
 // Initialize if not set
26 26
 if (!isset($_POST['y'])) {
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 if (\Xmf\Request::hasVar('update', 'POST')) {
54 54
     $Second = new Calendar_Second($_POST['y'], $_POST['m'], $_POST['d'], $_POST['h'], $_POST['i'], $_POST['s']);
55 55
     if (!$Second->isValid()) {
56
-        $V =& $Second->getValidator();
56
+        $V = & $Second->getValidator();
57 57
         echo '<p>Validation failed:</p>';
58 58
         while ($error = $V->fetch()) {
59
-            echo $error->toString() . '<br>';
59
+            echo $error->toString().'<br>';
60 60
         }
61 61
     } else {
62 62
         echo '<p>Validation success.</p>';
63
-        echo '<p>New timestamp is: ' . $Second->getTimestamp() . ' which could be used to update a database, for example';
63
+        echo '<p>New timestamp is: '.$Second->getTimestamp().' which could be used to update a database, for example';
64 64
     }
65 65
 } else {
66 66
     $Year   = new Calendar_Year($_POST['y']);
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
     $Year->build($selection);
79 79
     while ($Child = $Year->fetch()) {
80 80
         if ($Child->isSelected()) {
81
-            echo '<option value="' . $Child->thisMonth() . '" selected>' . $Child->thisMonth() . "\n";
81
+            echo '<option value="'.$Child->thisMonth().'" selected>'.$Child->thisMonth()."\n";
82 82
         } else {
83
-            echo '<option value="' . $Child->thisMonth() . '">' . $Child->thisMonth() . "\n";
83
+            echo '<option value="'.$Child->thisMonth().'">'.$Child->thisMonth()."\n";
84 84
         }
85 85
     } ?>
86 86
     </select>&nbsp;
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
     $Month->build($selection);
91 91
     while ($Child = $Month->fetch()) {
92 92
         if ($Child->isSelected()) {
93
-            echo '<option value="' . $Child->thisDay() . '" selected>' . $Child->thisDay() . "\n";
93
+            echo '<option value="'.$Child->thisDay().'" selected>'.$Child->thisDay()."\n";
94 94
         } else {
95
-            echo '<option value="' . $Child->thisDay() . '">' . $Child->thisDay() . "\n";
95
+            echo '<option value="'.$Child->thisDay().'">'.$Child->thisDay()."\n";
96 96
         }
97 97
     } ?>
98 98
     </select>&nbsp;
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
     $Day->build($selection);
103 103
     while ($Child = $Day->fetch()) {
104 104
         if ($Child->isSelected()) {
105
-            echo '<option value="' . $Child->thisHour() . '" selected>' . $Child->thisHour() . "\n";
105
+            echo '<option value="'.$Child->thisHour().'" selected>'.$Child->thisHour()."\n";
106 106
         } else {
107
-            echo '<option value="' . $Child->thisHour() . '">' . $Child->thisHour() . "\n";
107
+            echo '<option value="'.$Child->thisHour().'">'.$Child->thisHour()."\n";
108 108
         }
109 109
     } ?>
110 110
     </select>&nbsp;
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
     $Hour->build($selection);
115 115
     while ($Child = $Hour->fetch()) {
116 116
         if ($Child->isSelected()) {
117
-            echo '<option value="' . $Child->thisMinute() . '" selected>' . $Child->thisMinute() . "\n";
117
+            echo '<option value="'.$Child->thisMinute().'" selected>'.$Child->thisMinute()."\n";
118 118
         } else {
119
-            echo '<option value="' . $Child->thisMinute() . '">' . $Child->thisMinute() . "\n";
119
+            echo '<option value="'.$Child->thisMinute().'">'.$Child->thisMinute()."\n";
120 120
         }
121 121
     } ?>
122 122
     </select>&nbsp;
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
     $Minute->build($selection);
127 127
     while ($Child = $Minute->fetch()) {
128 128
         if ($Child->isSelected()) {
129
-            echo '<option value="' . $Child->thisSecond() . '" selected>' . $Child->thisSecond() . "\n";
129
+            echo '<option value="'.$Child->thisSecond().'" selected>'.$Child->thisSecond()."\n";
130 130
         } else {
131
-            echo '<option value="' . $Child->thisSecond() . '">' . $Child->thisSecond() . "\n";
131
+            echo '<option value="'.$Child->thisSecond().'">'.$Child->thisSecond()."\n";
132 132
         }
133 133
     } ?>
134 134
     </select>&nbsp;
@@ -136,6 +136,6 @@  discard block
 block discarded – undo
136 136
     <?php
137 137
 }
138 138
     ?>
139
-    <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?>
139
+    <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?>
140 140
 </body>
141 141
 </html>
Please login to merge, or discard this patch.