Completed
Push — master ( ec1681...68c045 )
by Michael
02:41
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 = [];
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/Month.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 Month and builds Days
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function build($sDates = [])
97 97
     {
98
-        require_once CALENDAR_ROOT . 'Day.php';
98
+        require_once CALENDAR_ROOT.'Day.php';
99 99
         $daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month);
100 100
         for ($i = 1; $i <= $daysInMonth; ++$i) {
101 101
             $this->children[$i] = new Calendar_Day($this->year, $this->month, $i);
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 = [])
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);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 && $this->day == $sDate->thisDay()
122 122
                 && $this->hour == $sDate->thisHour()
123 123
                 && $this->minute == $sDate->thisMinute()) {
124
-                $key = (int)$sDate->thisSecond();
124
+                $key = (int) $sDate->thisSecond();
125 125
                 if (isset($this->children[$key])) {
126 126
                     $sDate->setSelected();
127 127
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/calendar_test.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
     public function testPrevYear_Array()
38 38
     {
39 39
         $this->assertEqual([
40
-                               'year'   => 2002,
41
-                               'month'  => 1,
42
-                               'day'    => 1,
43
-                               'hour'   => 0,
44
-                               'minute' => 0,
45
-                               'second' => 0,
46
-                           ], $this->cal->prevYear('array'));
40
+                                'year'   => 2002,
41
+                                'month'  => 1,
42
+                                'day'    => 1,
43
+                                'hour'   => 0,
44
+                                'minute' => 0,
45
+                                'second' => 0,
46
+                            ], $this->cal->prevYear('array'));
47 47
     }
48 48
 
49 49
     public function testThisYear()
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
     public function testPrevMonth_Array()
65 65
     {
66 66
         $this->assertEqual([
67
-                               'year'   => 2003,
68
-                               'month'  => 9,
69
-                               'day'    => 1,
70
-                               'hour'   => 0,
71
-                               'minute' => 0,
72
-                               'second' => 0,
73
-                           ], $this->cal->prevMonth('array'));
67
+                                'year'   => 2003,
68
+                                'month'  => 9,
69
+                                'day'    => 1,
70
+                                'hour'   => 0,
71
+                                'minute' => 0,
72
+                                'second' => 0,
73
+                            ], $this->cal->prevMonth('array'));
74 74
     }
75 75
 
76 76
     public function testThisMonth()
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
     public function testPrevDay_Array()
92 92
     {
93 93
         $this->assertEqual([
94
-                               'year'   => 2003,
95
-                               'month'  => 10,
96
-                               'day'    => 24,
97
-                               'hour'   => 0,
98
-                               'minute' => 0,
99
-                               'second' => 0,
100
-                           ], $this->cal->prevDay('array'));
94
+                                'year'   => 2003,
95
+                                'month'  => 10,
96
+                                'day'    => 24,
97
+                                'hour'   => 0,
98
+                                'minute' => 0,
99
+                                'second' => 0,
100
+                            ], $this->cal->prevDay('array'));
101 101
     }
102 102
 
103 103
     public function testThisDay()
Please login to merge, or discard this patch.
class/pear/Calendar/tests/minute_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     public function testPrevDay_Array()
28 28
     {
29 29
         $this->assertEqual([
30
-                               'year'   => 2003,
31
-                               'month'  => 10,
32
-                               'day'    => 24,
33
-                               'hour'   => 0,
34
-                               'minute' => 0,
35
-                               'second' => 0,
36
-                           ], $this->cal->prevDay('array'));
30
+                                'year'   => 2003,
31
+                                'month'  => 10,
32
+                                'day'    => 24,
33
+                                'hour'   => 0,
34
+                                'minute' => 0,
35
+                                'second' => 0,
36
+                            ], $this->cal->prevDay('array'));
37 37
     }
38 38
 
39 39
     public function testPrevSecond()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMinute.
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     public function testSelection()
113 113
     {
114
-        require_once CALENDAR_ROOT . 'Second.php';
114
+        require_once CALENDAR_ROOT.'Second.php';
115 115
         $selection = [new Calendar_Second(2003, 10, 25, 13, 32, 43)];
116 116
         $this->cal->build($selection);
117 117
         $i = 0;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/month_weeks_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
     public function testPrevDay_Array()
33 33
     {
34 34
         $this->assertEqual([
35
-                               'year'   => 2003,
36
-                               'month'  => 9,
37
-                               'day'    => 30,
38
-                               'hour'   => 0,
39
-                               'minute' => 0,
40
-                               'second' => 0,
41
-                           ], $this->cal->prevDay('array'));
35
+                                'year'   => 2003,
36
+                                'month'  => 9,
37
+                                'day'    => 30,
38
+                                'hour'   => 0,
39
+                                'minute' => 0,
40
+                                'second' => 0,
41
+                            ], $this->cal->prevDay('array'));
42 42
     }
43 43
 
44 44
     public function testThisDay()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMonthWeeks.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     */
148 148
     public function testSelection()
149 149
     {
150
-        require_once CALENDAR_ROOT . 'Week.php';
150
+        require_once CALENDAR_ROOT.'Week.php';
151 151
         $selection = [new Calendar_Week(2003, 10, 12)];
152 152
         $this->cal->build($selection);
153 153
         $i        = 1;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/decorator_textual_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./decorator_test.php';
7
+require_once __DIR__.'/./decorator_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfDecoratorTextual.
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             5 => 'Fri',
195 195
             6 => 'Sat',
196 196
         ];
197
-        $nShifts      = CALENDAR_FIRST_DAY_OF_WEEK;
197
+        $nShifts = CALENDAR_FIRST_DAY_OF_WEEK;
198 198
         while ($nShifts-- > 0) {
199 199
             $day = array_shift($weekdayNames);
200 200
             array_push($weekdayNames, $day);
Please login to merge, or discard this patch.
class/pear/Calendar/tests/week_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@
 block discarded – undo
71 71
     public function testPrevDay_Array()
72 72
     {
73 73
         $this->assertEqual([
74
-                               'year'   => 2003,
75
-                               'month'  => 10,
76
-                               'day'    => 8,
77
-                               'hour'   => 0,
78
-                               'minute' => 0,
79
-                               'second' => 0,
80
-                           ], $this->cal->prevDay('array'));
74
+                                'year'   => 2003,
75
+                                'month'  => 10,
76
+                                'day'    => 8,
77
+                                'hour'   => 0,
78
+                                'minute' => 0,
79
+                                'second' => 0,
80
+                            ], $this->cal->prevDay('array'));
81 81
     }
82 82
 
83 83
     public function testThisDay()
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 //
3 3
 define('CALENDAR_FIRST_DAY_OF_WEEK', 1); //force firstDay = monday
4 4
 
5
-require_once __DIR__ . '/simple_include.php';
6
-require_once __DIR__ . '/calendar_include.php';
5
+require_once __DIR__.'/simple_include.php';
6
+require_once __DIR__.'/calendar_include.php';
7 7
 
8
-require_once __DIR__ . '/./calendar_test.php';
8
+require_once __DIR__.'/./calendar_test.php';
9 9
 
10 10
 /**
11 11
  * Class TestOfWeek.
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
     public function testSelection()
314 314
     {
315
-        require_once CALENDAR_ROOT . 'Day.php';
315
+        require_once CALENDAR_ROOT.'Day.php';
316 316
         $selection = [Calendar_Factory::create('Day', 2003, 10, 7)];
317 317
         $this->cal->build($selection);
318 318
         $i = 1;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
     public function testSelectionCornerCase()
329 329
     {
330
-        require_once CALENDAR_ROOT . 'Day.php';
330
+        require_once CALENDAR_ROOT.'Day.php';
331 331
         $selectedDays = [
332 332
             Calendar_Factory::create('Day', 2003, 12, 29),
333 333
             Calendar_Factory::create('Day', 2003, 12, 30),
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             Calendar_Factory::create('Day', 2004, 01, 03),
338 338
             Calendar_Factory::create('Day', 2004, 01, 04),
339 339
         ];
340
-        $this->cal    = Calendar_Factory::create('Week', 2003, 12, 31, 0);
340
+        $this->cal = Calendar_Factory::create('Week', 2003, 12, 31, 0);
341 341
         $this->cal->build($selectedDays);
342 342
         while ($Day = $this->cal->fetch()) {
343 343
             $this->assertTrue($Day->isSelected());
Please login to merge, or discard this patch.
class/pear/Calendar/tests/util_textual_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./decorator_test.php';
7
+require_once __DIR__.'/./decorator_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfUtilTextual.
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             5 => 'Fri',
217 217
             6 => 'Sat',
218 218
         ];
219
-        $nShifts      = CALENDAR_FIRST_DAY_OF_WEEK;
219
+        $nShifts = CALENDAR_FIRST_DAY_OF_WEEK;
220 220
         while ($nShifts-- > 0) {
221 221
             $day = array_shift($weekdayNames);
222 222
             array_push($weekdayNames, $day);
Please login to merge, or discard this patch.