Completed
Push — master ( a9decc...a21b67 )
by Michael
02:51
created
class/pear/Calendar/Month/Weeks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 /**
51 51
  * Load Calendar base class.
52 52
  */
53
-require_once CALENDAR_ROOT . 'Calendar.php';
53
+require_once CALENDAR_ROOT.'Calendar.php';
54 54
 
55 55
 /**
56 56
  * Load base month.
57 57
  */
58
-require_once CALENDAR_ROOT . 'Month.php';
58
+require_once CALENDAR_ROOT.'Month.php';
59 59
 
60 60
 /**
61 61
  * Represents a Month and builds Weeks
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function build($sDates = array())
118 118
     {
119
-        require_once CALENDAR_ROOT . 'Table/Helper.php';
119
+        require_once CALENDAR_ROOT.'Table/Helper.php';
120 120
         $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay);
121
-        require_once CALENDAR_ROOT . 'Week.php';
121
+        require_once CALENDAR_ROOT.'Week.php';
122 122
         $numWeeks = $this->tableHelper->getNumWeeks();
123 123
         for ($i = 1, $d = 1; $i <= $numWeeks; ++$i, $d += $this->cE->getDaysInWeek($this->thisYear(), $this->thisMonth(), $this->thisDay())) {
124 124
             $this->children[$i] = new Calendar_Week($this->year, $this->month, $d, $this->tableHelper->getFirstDay());
Please login to merge, or discard this patch.
class/pear/Calendar/Year.php 1 patch
Spacing   +2 added lines, -2 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 Year and builds Months<br>
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function build($sDates = array(), $firstDay = null)
105 105
     {
106
-        require_once CALENDAR_ROOT . 'Factory.php';
106
+        require_once CALENDAR_ROOT.'Factory.php';
107 107
         $this->firstDay = $this->defineFirstDayOfWeek($firstDay);
108 108
         $monthsInYear   = $this->cE->getMonthsInYear($this->thisYear());
109 109
         for ($i = 1; $i <= $monthsInYear; ++$i) {
Please login to merge, or discard this patch.
class/pear/Calendar/Week.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 /**
51 51
  * Load Calendar base class.
52 52
  */
53
-require_once CALENDAR_ROOT . 'Calendar.php';
53
+require_once CALENDAR_ROOT.'Calendar.php';
54 54
 
55 55
 /**
56 56
  * Represents a Week and builds Days in tabular format<br>
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function __construct($y, $m, $d, $firstDay = null)
140 140
     {
141
-        require_once CALENDAR_ROOT . 'Table/Helper.php';
141
+        require_once CALENDAR_ROOT.'Table/Helper.php';
142 142
         parent::__construct($y, $m, $d);
143 143
         $this->firstDay    = $this->defineFirstDayOfWeek($firstDay);
144 144
         $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function build($sDates = array())
172 172
     {
173
-        require_once CALENDAR_ROOT . 'Day.php';
173
+        require_once CALENDAR_ROOT.'Day.php';
174 174
         $year  = $this->cE->stampToYear($this->thisWeek);
175 175
         $month = $this->cE->stampToMonth($this->thisWeek);
176 176
         $day   = $this->cE->stampToDay($this->thisWeek);
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             case 'array':
296 296
                 return $this->toArray($this->prevWeek);
297 297
             case 'object':
298
-                require_once CALENDAR_ROOT . 'Factory.php';
298
+                require_once CALENDAR_ROOT.'Factory.php';
299 299
 
300 300
                 return Calendar_Factory::createByTimestamp('Week', $this->prevWeek);
301 301
             case 'timestamp':
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             case 'array':
330 330
                 return $this->toArray($this->thisWeek);
331 331
             case 'object':
332
-                require_once CALENDAR_ROOT . 'Factory.php';
332
+                require_once CALENDAR_ROOT.'Factory.php';
333 333
 
334 334
                 return Calendar_Factory::createByTimestamp('Week', $this->thisWeek);
335 335
             case 'timestamp':
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             case 'array':
357 357
                 return $this->toArray($this->nextWeek);
358 358
             case 'object':
359
-                require_once CALENDAR_ROOT . 'Factory.php';
359
+                require_once CALENDAR_ROOT.'Factory.php';
360 360
 
361 361
                 return Calendar_Factory::createByTimestamp('Week', $this->nextWeek);
362 362
             case 'timestamp':
Please login to merge, or discard this patch.
class/pear/Calendar/Hour.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 an Hour and builds Minutes
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function build($sDates = array())
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);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 && $this->day == $sDate->thisDay()
120 120
                 && $this->hour == $sDate->thisHour()
121 121
             ) {
122
-                $key = (int)$sDate->thisMinute();
122
+                $key = (int) $sDate->thisMinute();
123 123
                 if (isset($this->children[$key])) {
124 124
                     $sDate->setSelected();
125 125
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.
class/pear/Calendar/Minute.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 Minute and builds Seconds
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function build($sDates = array())
97 97
     {
98
-        require_once CALENDAR_ROOT . 'Second.php';
98
+        require_once CALENDAR_ROOT.'Second.php';
99 99
         $sIM = $this->cE->getSecondsInMinute($this->year, $this->month, $this->day, $this->hour, $this->minute);
100 100
         for ($i = 0; $i < $sIM; ++$i) {
101 101
             $this->children[$i] = new Calendar_Second($this->year, $this->month, $this->day, $this->hour, $this->minute, $i);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 && $this->hour == $sDate->thisHour()
123 123
                 && $this->minute == $sDate->thisMinute()
124 124
             ) {
125
-                $key = (int)$sDate->thisSecond();
125
+                $key = (int) $sDate->thisSecond();
126 126
                 if (isset($this->children[$key])) {
127 127
                     $sDate->setSelected();
128 128
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.
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 1 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.