Completed
Push — master ( a9decc...a21b67 )
by Michael
02:51
created
class/pear/Calendar/Engine/PearDate.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 /**
41 41
  * Load PEAR::Date class.
42 42
  */
43
-require_once __DIR__ . '/Date.php';
43
+require_once __DIR__.'/Date.php';
44 44
 
45 45
 /**
46 46
  * Performs calendar calculations based on the PEAR::Date class
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $date = self::stampCollection($stamp);
88 88
 
89
-        return (int)$date->year;
89
+        return (int) $date->year;
90 90
     }
91 91
 
92 92
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $date = self::stampCollection($stamp);
102 102
 
103
-        return (int)$date->month;
103
+        return (int) $date->month;
104 104
     }
105 105
 
106 106
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $date = self::stampCollection($stamp);
116 116
 
117
-        return (int)$date->day;
117
+        return (int) $date->day;
118 118
     }
119 119
 
120 120
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $date = self::stampCollection($stamp);
130 130
 
131
-        return (int)$date->hour;
131
+        return (int) $date->hour;
132 132
     }
133 133
 
134 134
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $date = self::stampCollection($stamp);
144 144
 
145
-        return (int)$date->minute;
145
+        return (int) $date->minute;
146 146
     }
147 147
 
148 148
     /**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $date = self::stampCollection($stamp);
158 158
 
159
-        return (int)$date->second;
159
+        return (int) $date->second;
160 160
     }
161 161
 
162 162
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $r = array();
177 177
         self::adjustDate($y, $m, $d, $h, $i, $s);
178
-        $key = $y . $m . $d . $h . $i . $s;
178
+        $key = $y.$m.$d.$h.$i.$s;
179 179
         if (!isset($r[$key])) {
180 180
             $r[$key] = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $y, $m, $d, $h, $i, $s);
181 181
         }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function getDaysInMonth($y, $m)
288 288
     {
289
-        return (int)Date_Calc::daysInMonth($m, $y);
289
+        return (int) Date_Calc::daysInMonth($m, $y);
290 290
     }
291 291
 
292 292
     /**
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      */
301 301
     public function getFirstDayInMonth($y, $m)
302 302
     {
303
-        return (int)Date_Calc::dayOfWeek(1, $m, $y);
303
+        return (int) Date_Calc::dayOfWeek(1, $m, $y);
304 304
     }
305 305
 
306 306
     /**
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     public function getWeekNInMonth($y, $m, $d, $firstDay = 1)
348 348
     {
349 349
         $weekEnd     = ($firstDay == 0) ? $this->getDaysInWeek() - 1 : $firstDay - 1;
350
-        $end_of_week = (int)Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true);
350
+        $end_of_week = (int) Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true);
351 351
         $w           = 1;
352 352
         while ($d > $end_of_week) {
353 353
             ++$w;
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         }
382 382
         $daysInTheFirstWeek %= $this->getDaysInWeek();
383 383
 
384
-        return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks);
384
+        return (int) (ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / $this->getDaysInWeek()) + $weeks);
385 385
     }
386 386
 
387 387
     /**
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/7.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             'in'  => array('year' => 'int', 'month' => 'int'),
25 25
             'out' => array('month' => '{urn:PEAR_SOAP_Calendar}Month'),
26 26
         );
27
-        $this->__typedef['Month']         = array(
27
+        $this->__typedef['Month'] = array(
28 28
             'monthname' => 'string',
29 29
             'days'      => '{urn:PEAR_SOAP_Calendar}MonthDays',
30 30
         );
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
74 74
             $Month->build();
75 75
             while ($Day = $Month->fetch()) {
76 76
                 $day    = array(
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
             }
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/8.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $basePath = explode('/', $_SERVER['SCRIPT_NAME']);
16 16
 array_pop($basePath);
17 17
 $basePath = implode('/', $basePath);
18
-$url      = 'http://' . $_SERVER['SERVER_NAME'] . $basePath . '/7.php?wsdl';
18
+$url      = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl';
19 19
 
20 20
 if (!isset($_GET['y'])) {
21 21
     $_GET['y'] = date('Y');
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 
27 27
 $wsdl = new SOAP_WSDL($url);
28 28
 
29
-echo '<pre>' . $wsdl->generateProxyCode() . '</pre>';
29
+echo '<pre>'.$wsdl->generateProxyCode().'</pre>';
30 30
 
31 31
 $calendarClient = $wsdl->getProxy();
32 32
 
33
-$month = $calendarClient->getMonth((int)$_GET['y'], (int)$_GET['m']);
33
+$month = $calendarClient->getMonth((int) $_GET['y'], (int) $_GET['m']);
34 34
 
35 35
 if (PEAR::isError($month)) {
36 36
     die($month->toString());
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if ($day->isEmpty === 1) {
63 63
             echo '<td></td>';
64 64
         } else {
65
-            echo '<td>' . $day->day . '</td>';
65
+            echo '<td>'.$day->day.'</td>';
66 66
         }
67 67
         if ($day->isLast === 1) {
68 68
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/6.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -85,26 +85,26 @@  discard block
 block discarded – undo
85 85
                     echo "<td></td>\n";
86 86
                 } elseif ($Day->isSelected()) {
87 87
                     echo '<td><anchor><strong><u>'
88
-                             . $Day->thisDay()
89
-                             . "</u></strong>\n<go href=\""
90
-                             . $_SERVER['PHP_SELF']
91
-                             . '?viewday=true&amp;y='
92
-                             . $Day->thisYear()
93
-                             . '&amp;m='
94
-                             . $Day->thisMonth()
95
-                             . '&amp;d='
96
-                             . $Day->thisDay()
97
-                             . "&amp;mime=wml\">\n</anchor></td>\n";
88
+                                . $Day->thisDay()
89
+                                . "</u></strong>\n<go href=\""
90
+                                . $_SERVER['PHP_SELF']
91
+                                . '?viewday=true&amp;y='
92
+                                . $Day->thisYear()
93
+                                . '&amp;m='
94
+                                . $Day->thisMonth()
95
+                                . '&amp;d='
96
+                                . $Day->thisDay()
97
+                                . "&amp;mime=wml\">\n</anchor></td>\n";
98 98
                 } else {
99 99
                     echo '<td><anchor>'
100
-                             . $Day->thisDay()
101
-                             . "\n<go href=\"?viewday=true&amp;y="
102
-                             . $Day->thisYear()
103
-                             . '&amp;m='
104
-                             . $Day->thisMonth()
105
-                             . '&amp;d='
106
-                             . $Day->thisDay()
107
-                             . "&amp;mime=wml\"></anchor></td>\n";
100
+                                . $Day->thisDay()
101
+                                . "\n<go href=\"?viewday=true&amp;y="
102
+                                . $Day->thisYear()
103
+                                . '&amp;m='
104
+                                . $Day->thisMonth()
105
+                                . '&amp;d='
106
+                                . $Day->thisDay()
107
+                                . "&amp;mime=wml\"></anchor></td>\n";
108 108
                 }
109 109
                 if ($Day->isLast()) {
110 110
                     echo "</tr>\n";
@@ -197,28 +197,28 @@  discard block
 block discarded – undo
197 197
                 echo "<td></td>\n";
198 198
             } elseif ($Day->isSelected()) {
199 199
                 echo '<td><a href="'
200
-                         . $_SERVER['PHP_SELF']
201
-                         . '?viewday=true&amp;y='
202
-                         . $Day->thisYear()
203
-                         . '&amp;m='
204
-                         . $Day->thisMonth()
205
-                         . '&amp;d='
206
-                         . $Day->thisDay()
207
-                         . '&amp;wml"><strong><u>'
208
-                         . $Day->thisDay()
209
-                         . "</u></strong></a></td>\n";
200
+                            . $_SERVER['PHP_SELF']
201
+                            . '?viewday=true&amp;y='
202
+                            . $Day->thisYear()
203
+                            . '&amp;m='
204
+                            . $Day->thisMonth()
205
+                            . '&amp;d='
206
+                            . $Day->thisDay()
207
+                            . '&amp;wml"><strong><u>'
208
+                            . $Day->thisDay()
209
+                            . "</u></strong></a></td>\n";
210 210
             } else {
211 211
                 echo '<td><a href="'
212
-                         . $_SERVER['PHP_SELF']
213
-                         . '?viewday=true&amp;y='
214
-                         . $Day->thisYear()
215
-                         . '&amp;m='
216
-                         . $Day->thisMonth()
217
-                         . '&amp;d='
218
-                         . $Day->thisDay()
219
-                         . '">'
220
-                         . $Day->thisDay()
221
-                         . "</a></td>\n";
212
+                            . $_SERVER['PHP_SELF']
213
+                            . '?viewday=true&amp;y='
214
+                            . $Day->thisYear()
215
+                            . '&amp;m='
216
+                            . $Day->thisMonth()
217
+                            . '&amp;d='
218
+                            . $Day->thisDay()
219
+                            . '">'
220
+                            . $Day->thisDay()
221
+                            . "</a></td>\n";
222 222
             }
223 223
             if ($Day->isLast()) {
224 224
                 echo "</tr>\n";
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     list($usec, $sec) = explode(' ', microtime());
10 10
 
11
-    return (float)$usec + (float)$sec;
11
+    return (float) $usec + (float) $sec;
12 12
 }
13 13
 
14 14
 $start = getmicrotime();
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 if (!@include 'Calendar/Calendar.php') {
17 17
     define('CALENDAR_ROOT', '../../');
18 18
 }
19
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
20
-require_once CALENDAR_ROOT . 'Day.php';
19
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
20
+require_once CALENDAR_ROOT.'Day.php';
21 21
 
22 22
 if (!isset($_GET['y'])) {
23 23
     $_GET['y'] = date('Y');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 <anchor>
49 49
                     Back to Month View
50 50
                     <go href="<?php
51
-                    echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '&amp;mime=wml'; ?>"/>
51
+                    echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;mime=wml'; ?>"/>
52 52
                 </anchor>
53 53
             </p>
54 54
             <table>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 $Day->build();
57 57
             while ($Hour = $Day->fetch()) {
58 58
                 echo "<tr>\n";
59
-                echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
59
+                echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
60 60
                 echo "</tr>\n";
61 61
             } ?>
62 62
             </table>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                         <anchor>
116 116
                             &lt;&lt;
117 117
                             <go href="<?php
118
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>"/>
118
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>"/>
119 119
                         </anchor>
120 120
                     </td>
121 121
                     <td></td>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                         <anchor>
128 128
                             &gt;&gt;
129 129
                             <go href="<?php
130
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>"/>
130
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>"/>
131 131
                         </anchor>
132 132
                     </td>
133 133
                 </tr>
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
         } ?>
139 139
         <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p>
140
-        <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?>
140
+        <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?>
141 141
     </wml>
142 142
     <?php
143 143
     #-----------------------------------------------------------------------------#
@@ -161,14 +161,14 @@  discard block
 block discarded – undo
161 161
         <p>
162 162
             <anchor>
163 163
                 <a href="<?php
164
-                echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay(); ?>">Back to Month View</a>
164
+                echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay(); ?>">Back to Month View</a>
165 165
         </p>
166 166
         <table>
167 167
             <?php
168 168
             $Day->build();
169 169
         while ($Hour = $Day->fetch()) {
170 170
             echo "<tr>\n";
171
-            echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
171
+            echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
172 172
             echo "</tr>\n";
173 173
         } ?>
174 174
         </table>
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             <tr>
228 228
                 <td>
229 229
                     <a href="<?php
230
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay(); ?>">
230
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay(); ?>">
231 231
                         &lt;&lt;</a>
232 232
                 </td>
233 233
                 <td></td>
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                 <td></td>
238 238
                 <td>
239 239
                     <a href="<?php
240
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay(); ?>">&gt;&gt;</a>
240
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay(); ?>">&gt;&gt;</a>
241 241
                 </td>
242 242
             </tr>
243 243
         </table>
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
     } ?>
248 248
 
249
-    <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?>
249
+    <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?>
250 250
     </body>
251 251
     </html>
252 252
     <?php
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/17.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
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 . 'Month/Weekdays.php';
11
-require_once CALENDAR_ROOT . 'Decorator/Textual.php';
9
+require_once CALENDAR_ROOT.'Day.php';
10
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
11
+require_once CALENDAR_ROOT.'Decorator/Textual.php';
12 12
 
13 13
 // Could change language like this
14 14
 // setlocale (LC_TIME, "de_DE"); // Unix based (probably)
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 // Decorate
29 29
 $Textual = new Calendar_Decorator_Textual($Calendar);
30 30
 
31
-echo '<hr>Previous month is: ' . $Textual->prevMonthName('two') . '<br>';
32
-echo 'This month is: ' . $Textual->thisMonthName('short') . '<br>';
33
-echo 'Next month is: ' . $Textual->nextMonthName() . '<br><hr>';
34
-echo 'Previous day is: ' . $Textual->prevDayName() . '<br>';
35
-echo 'This day is: ' . $Textual->thisDayName('short') . '<br>';
36
-echo 'Next day is: ' . $Textual->nextDayName('one') . '<br><hr>';
31
+echo '<hr>Previous month is: '.$Textual->prevMonthName('two').'<br>';
32
+echo 'This month is: '.$Textual->thisMonthName('short').'<br>';
33
+echo 'Next month is: '.$Textual->nextMonthName().'<br><hr>';
34
+echo 'Previous day is: '.$Textual->prevDayName().'<br>';
35
+echo 'This day is: '.$Textual->thisDayName('short').'<br>';
36
+echo 'Next day is: '.$Textual->nextDayName('one').'<br><hr>';
37 37
 
38 38
 echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br>";
39 39
 $Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 ?>
44 44
 <p>Rendering calendar....</p>
45 45
 <table>
46
-    <caption><?php echo $Textual->thisMonthName() . ' ' . $Textual->thisYear(); ?></caption>
46
+    <caption><?php echo $Textual->thisMonthName().' '.$Textual->thisYear(); ?></caption>
47 47
     <tr>
48 48
         <?php
49 49
         $dayheaders = $Textual->orderedWeekdays('short');
50 50
         foreach ($dayheaders as $dayheader) {
51
-            echo '<th>' . $dayheader . '</th>';
51
+            echo '<th>'.$dayheader.'</th>';
52 52
         }
53 53
         ?>
54 54
     </tr>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         if ($Day->isEmpty()) {
62 62
             echo '<td>&nbsp;</td>';
63 63
         } else {
64
-            echo '<td>' . $Day->thisDay() . '</td>';
64
+            echo '<td>'.$Day->thisDay().'</td>';
65 65
         }
66 66
         if ($Day->isLast()) {
67 67
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/23.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
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 . 'Month/Weekdays.php';
11
-require_once CALENDAR_ROOT . 'Util/Textual.php';
9
+require_once CALENDAR_ROOT.'Day.php';
10
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
11
+require_once CALENDAR_ROOT.'Util/Textual.php';
12 12
 
13 13
 // Could change language like this
14 14
 // setlocale (LC_TIME, "de_DE"); // Unix based (probably)
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br>";
26 26
 $Calendar = new Calendar_Day(date('Y'), date('n'), date('d'));
27 27
 
28
-echo '<hr>Previous month is: ' . Calendar_Util_Textual::prevMonthName($Calendar, 'two') . '<br>';
29
-echo 'This month is: ' . Calendar_Util_Textual::thisMonthName($Calendar, 'short') . '<br>';
30
-echo 'Next month is: ' . Calendar_Util_Textual::nextMonthName($Calendar) . '<br><hr>';
31
-echo 'Previous day is: ' . Calendar_Util_Textual::prevDayName($Calendar) . '<br>';
32
-echo 'This day is: ' . Calendar_Util_Textual::thisDayName($Calendar, 'short') . '<br>';
33
-echo 'Next day is: ' . Calendar_Util_Textual::nextDayName($Calendar, 'one') . '<br><hr>';
28
+echo '<hr>Previous month is: '.Calendar_Util_Textual::prevMonthName($Calendar, 'two').'<br>';
29
+echo 'This month is: '.Calendar_Util_Textual::thisMonthName($Calendar, 'short').'<br>';
30
+echo 'Next month is: '.Calendar_Util_Textual::nextMonthName($Calendar).'<br><hr>';
31
+echo 'Previous day is: '.Calendar_Util_Textual::prevDayName($Calendar).'<br>';
32
+echo 'This day is: '.Calendar_Util_Textual::thisDayName($Calendar, 'short').'<br>';
33
+echo 'Next day is: '.Calendar_Util_Textual::nextDayName($Calendar, 'one').'<br><hr>';
34 34
 
35 35
 echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br>";
36 36
 $Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6);
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
 ?>
39 39
 <p>Rendering calendar....</p>
40 40
 <table>
41
-    <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar) . ' ' . $Calendar->thisYear(); ?></caption>
41
+    <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar).' '.$Calendar->thisYear(); ?></caption>
42 42
     <tr>
43 43
         <?php
44 44
         $dayheaders = Calendar_Util_Textual::orderedWeekdays($Calendar, 'short');
45 45
         foreach ($dayheaders as $dayheader) {
46
-            echo '<th>' . $dayheader . '</th>';
46
+            echo '<th>'.$dayheader.'</th>';
47 47
         }
48 48
         ?>
49 49
     </tr>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if ($Day->isEmpty()) {
57 57
             echo '<td>&nbsp;</td>';
58 58
         } else {
59
-            echo '<td>' . $Day->thisDay() . '</td>';
59
+            echo '<td>'.$Day->thisDay().'</td>';
60 60
         }
61 61
         if ($Day->isLast()) {
62 62
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/Day.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
113 113
      */
114 114
     public function build($sDates = array())
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) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth()
139 139
                 && $this->day == $sDate->thisDay()
140 140
             ) {
141
-                $key = (int)$sDate->thisHour();
141
+                $key = (int) $sDate->thisHour();
142 142
                 if (isset($this->children[$key])) {
143 143
                     $sDate->setSelected();
144 144
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.
class/file.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
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
 block discarded – undo
68 68
         $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
69 69
 
70 70
         $allowedMimeType = array();
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
class/form/formrrulecheckbox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@
 block discarded – undo
42 42
         $ret = '<table><tr>';
43 43
         $i   = 0;
44 44
         if (count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) !== '[]') {
45
-            $newname = $this->getName() . '[]';
45
+            $newname = $this->getName().'[]';
46 46
             $this->setName($newname);
47 47
         }
48 48
         foreach ($this->getOptions() as $value => $name) {
49 49
             if ((++$i) % 6 == 0) {
50 50
                 $ret .= '</tr><tr>';
51 51
             }
52
-            $ret .= "<td><input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
52
+            $ret .= "<td><input type='checkbox' name='".$this->getName()."' value='".$value."'";
53 53
             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
54 54
                 $ret .= ' checked';
55 55
             }
56
-            $ret .= $this->getExtra() . '>' . $name . "</td>\n";
56
+            $ret .= $this->getExtra().'>'.$name."</td>\n";
57 57
         }
58 58
         $ret .= '</tr></table>';
59 59
 
Please login to merge, or discard this patch.