Passed
Pull Request — master (#2)
by tsms
01:30
created
docs/examples/21.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         case 6:
105 105
         case 9:
106 106
             echo "</tr>\n<tr>\n";
107
-           break;
107
+            break;
108 108
         case 12:
109 109
             echo "</tr>\n";
110 110
             break;
Please login to merge, or discard this patch.
docs/examples/3.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         echo ( "<tr>\n" );
106 106
 
107 107
     if ( $Day->isSelected() ) {
108
-       echo ( "<td class=\"selected\">".$Day->thisDay()."</td>\n" );
108
+        echo ( "<td class=\"selected\">".$Day->thisDay()."</td>\n" );
109 109
     } else if ( $Day->isEmpty() ) {
110 110
         echo ( "<td>&nbsp;</td>\n" );
111 111
     } else {
Please login to merge, or discard this patch.
docs/examples/10.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
 // Decorate a Month with methods to improve formatting
16 16
 class MonthDecorator extends Calendar_Decorator {
17 17
     /**
18
-    * @param Calendar_Month
19
-    */
18
+     * @param Calendar_Month
19
+     */
20 20
     function MonthDecorator(& $Month) {
21 21
         parent::Calendar_Decorator($Month);
22 22
     }
23 23
     /**
24
-    * Override the prevMonth method to format the output
25
-    */
24
+     * Override the prevMonth method to format the output
25
+     */
26 26
     function prevMonth() {
27 27
         $prevStamp = parent::prevMonth(TRUE);
28 28
         // Build the URL for the previous month
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
             '&m='.date('n',$prevStamp).'&d='.date('j',$prevStamp);
31 31
     }
32 32
     /**
33
-    * Override the thisMonth method to format the output
34
-    */
33
+     * Override the thisMonth method to format the output
34
+     */
35 35
     function thisMonth() {
36 36
         $thisStamp = parent::thisMonth(TRUE);
37 37
         // A human readable string from this month
38 38
         return date('F Y',$thisStamp);
39 39
     }
40 40
     /**
41
-    * Override the nextMonth method to format the output
42
-    */
41
+     * Override the nextMonth method to format the output
42
+     */
43 43
     function nextMonth() {
44 44
         $nextStamp = parent::nextMonth(TRUE);
45 45
         // Build the URL for next month
Please login to merge, or discard this patch.
docs/examples/14.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         echo "<tr>\n";
112 112
 
113 113
     if ($day->isSelected()) {
114
-       echo '<td class="selected">'.$day->thisDay().'</td>'."\n";
114
+        echo '<td class="selected">'.$day->thisDay().'</td>'."\n";
115 115
     } else if ($day->isEmpty()) {
116 116
         echo '<td>&nbsp;</td>'."\n";
117 117
     } else {
Please login to merge, or discard this patch.
docs/examples/7.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
     {
20 20
         $this->__dispatch_map['getMonth'] =
21 21
             array('in'  => array('year' => 'int', 'month'=>'int'),
22
-                  'out' => array('month' => '{urn:PEAR_SOAP_Calendar}Month'),
23
-                  );
22
+                    'out' => array('month' => '{urn:PEAR_SOAP_Calendar}Month'),
23
+                    );
24 24
         $this->__typedef['Month'] = array (
25 25
                 'monthname' => 'string',
26 26
                 'days' => '{urn:PEAR_SOAP_Calendar}MonthDays'
Please login to merge, or discard this patch.
src/Week.php 1 patch
Switch Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -346,22 +346,22 @@  discard block
 block discarded – undo
346 346
     function prevWeek($format = 'n_in_month')
347 347
     {
348 348
         switch (strtolower($format)) {
349
-        case 'int':
350
-        case 'n_in_month':
351
-            return ($this->firstWeek) ? null : $this->thisWeek('n_in_month') -1;
352
-        case 'n_in_year':
353
-            return $this->cE->getWeekNInYear(
354
-                $this->cE->stampToYear($this->prevWeek),
355
-                $this->cE->stampToMonth($this->prevWeek),
356
-                $this->cE->stampToDay($this->prevWeek));
357
-        case 'array':
358
-            return $this->toArray($this->prevWeek);
359
-        case 'object':
360
-            include_once CALENDAR_ROOT.'Factory.php';
361
-            return Factory::createByTimestamp('Week', $this->prevWeek);
362
-        case 'timestamp':
363
-        default:
364
-            return $this->prevWeek;
349
+            case 'int':
350
+            case 'n_in_month':
351
+                return ($this->firstWeek) ? null : $this->thisWeek('n_in_month') -1;
352
+            case 'n_in_year':
353
+                return $this->cE->getWeekNInYear(
354
+                    $this->cE->stampToYear($this->prevWeek),
355
+                    $this->cE->stampToMonth($this->prevWeek),
356
+                    $this->cE->stampToDay($this->prevWeek));
357
+            case 'array':
358
+                return $this->toArray($this->prevWeek);
359
+            case 'object':
360
+                include_once CALENDAR_ROOT.'Factory.php';
361
+                return Factory::createByTimestamp('Week', $this->prevWeek);
362
+            case 'timestamp':
363
+            default:
364
+                return $this->prevWeek;
365 365
         }
366 366
     }
367 367
 
@@ -376,35 +376,35 @@  discard block
 block discarded – undo
376 376
     function thisWeek($format = 'n_in_month')
377 377
     {
378 378
         switch (strtolower($format)) {
379
-        case 'int':
380
-        case 'n_in_month':
381
-            if ($this->firstWeek) {
382
-                return 1;
383
-            }
384
-            if ($this->lastWeek) {
385
-                return $this->cE->getWeeksInMonth(
379
+            case 'int':
380
+            case 'n_in_month':
381
+                if ($this->firstWeek) {
382
+                    return 1;
383
+                }
384
+                if ($this->lastWeek) {
385
+                    return $this->cE->getWeeksInMonth(
386
+                        $this->thisYear(),
387
+                        $this->thisMonth(),
388
+                        $this->firstDay);
389
+                }
390
+                return $this->cE->getWeekNInMonth(
386 391
                     $this->thisYear(),
387 392
                     $this->thisMonth(),
393
+                    $this->thisDay(),
388 394
                     $this->firstDay);
389
-            }
390
-            return $this->cE->getWeekNInMonth(
391
-                $this->thisYear(),
392
-                $this->thisMonth(),
393
-                $this->thisDay(),
394
-                $this->firstDay);
395
-        case 'n_in_year':
396
-            return $this->cE->getWeekNInYear(
397
-                $this->cE->stampToYear($this->thisWeek),
398
-                $this->cE->stampToMonth($this->thisWeek),
399
-                $this->cE->stampToDay($this->thisWeek));
400
-        case 'array':
401
-            return $this->toArray($this->thisWeek);
402
-        case 'object':
403
-            include_once CALENDAR_ROOT.'Factory.php';
404
-            return Factory::createByTimestamp('Week', $this->thisWeek);
405
-        case 'timestamp':
406
-        default:
407
-            return $this->thisWeek;
395
+            case 'n_in_year':
396
+                return $this->cE->getWeekNInYear(
397
+                    $this->cE->stampToYear($this->thisWeek),
398
+                    $this->cE->stampToMonth($this->thisWeek),
399
+                    $this->cE->stampToDay($this->thisWeek));
400
+            case 'array':
401
+                return $this->toArray($this->thisWeek);
402
+            case 'object':
403
+                include_once CALENDAR_ROOT.'Factory.php';
404
+                return Factory::createByTimestamp('Week', $this->thisWeek);
405
+            case 'timestamp':
406
+            default:
407
+                return $this->thisWeek;
408 408
         }
409 409
     }
410 410
 
@@ -419,22 +419,22 @@  discard block
 block discarded – undo
419 419
     function nextWeek($format = 'n_in_month')
420 420
     {
421 421
         switch (strtolower($format)) {
422
-        case 'int':
423
-        case 'n_in_month':
424
-            return ($this->lastWeek) ? null : $this->thisWeek('n_in_month') +1;
425
-        case 'n_in_year':
426
-            return $this->cE->getWeekNInYear(
427
-                $this->cE->stampToYear($this->nextWeek),
428
-                $this->cE->stampToMonth($this->nextWeek),
429
-                $this->cE->stampToDay($this->nextWeek));
430
-        case 'array':
431
-            return $this->toArray($this->nextWeek);
432
-        case 'object':
433
-            include_once CALENDAR_ROOT.'Factory.php';
434
-            return Factory::createByTimestamp('Week', $this->nextWeek);
435
-        case 'timestamp':
436
-        default:
437
-            return $this->nextWeek;
422
+            case 'int':
423
+            case 'n_in_month':
424
+                return ($this->lastWeek) ? null : $this->thisWeek('n_in_month') +1;
425
+            case 'n_in_year':
426
+                return $this->cE->getWeekNInYear(
427
+                    $this->cE->stampToYear($this->nextWeek),
428
+                    $this->cE->stampToMonth($this->nextWeek),
429
+                    $this->cE->stampToDay($this->nextWeek));
430
+            case 'array':
431
+                return $this->toArray($this->nextWeek);
432
+            case 'object':
433
+                include_once CALENDAR_ROOT.'Factory.php';
434
+                return Factory::createByTimestamp('Week', $this->nextWeek);
435
+            case 'timestamp':
436
+            default:
437
+                return $this->nextWeek;
438 438
         }
439 439
     }
440 440
 
Please login to merge, or discard this patch.
src/Util/Textual.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
             $stamp = mktime(0, 0, 0, $i, 1, 2003);
97 97
             $month = strftime($formats[$format], $stamp);
98 98
             switch($format) {
99
-            case 'one':
100
-                $month = substr($month, 0, 1);
101
-                break;
102
-            case 'two':
103
-                $month = substr($month, 0, 2);
104
-                break;
99
+                case 'one':
100
+                    $month = substr($month, 0, 1);
101
+                    break;
102
+                case 'two':
103
+                    $month = substr($month, 0, 2);
104
+                    break;
105 105
             }
106 106
             $months[$i] = $month;
107 107
         }
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
             $stamp = mktime(0, 0, 0, 11, $i+2, 2003);
134 134
             $day = strftime($formats[$format], $stamp);
135 135
             switch($format) {
136
-            case 'one':
137
-                $day = substr($day, 0, 1);
138
-                break;
139
-            case 'two':
140
-                $day = substr($day, 0, 2);
141
-                break;
136
+                case 'one':
137
+                    $day = substr($day, 0, 1);
138
+                    break;
139
+                case 'two':
140
+                    $day = substr($day, 0, 2);
141
+                    break;
142 142
             }
143 143
             $days[$i] = $day;
144 144
         }
Please login to merge, or discard this patch.
src/Decorator.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      *
394 394
      * @return int e.g. 4 or Unix timestamp
395 395
      * @access public
396
-      */
396
+     */
397 397
     function prevMonth($format = 'int')
398 398
     {
399 399
         return $this->calendar->prevMonth($format);
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
      *
433 433
      * @return int e.g. 4 or Unix timestamp
434 434
      * @access public
435
-      */
435
+     */
436 436
     function prevWeek($format = 'n_in_month')
437 437
     {
438 438
         if ( method_exists($this->calendar, 'prevWeek')) {
Please login to merge, or discard this patch.
src/Calendar.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) {
492 492
             if (!is_null($firstDay) && ($firstDay != CALENDAR_FIRST_DAY_OF_WEEK)) {
493 493
                 $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'
494
-                  .' The $firstDay parameter will be ignored.';
494
+                    .' The $firstDay parameter will be ignored.';
495 495
                 trigger_error($msg, E_USER_WARNING);
496 496
             }
497 497
             return CALENDAR_FIRST_DAY_OF_WEEK;
@@ -714,8 +714,8 @@  discard block
 block discarded – undo
714 714
     }
715 715
 
716 716
     /**
717
-    * Returns the value for the next minute
718
-    *
717
+     * Returns the value for the next minute
718
+     *
719 719
      * @param string $format return value format ['int'|'timestamp'|'object'|'array']
720 720
      *
721 721
      * @return int e.g. 25 or timestamp
@@ -748,8 +748,8 @@  discard block
 block discarded – undo
748 748
     /**
749 749
      * Returns the value for this second
750 750
      *
751
-    * @param string $format return value format ['int'|'timestamp'|'object'|'array']
752
-    *
751
+     * @param string $format return value format ['int'|'timestamp'|'object'|'array']
752
+     *
753 753
      * @return int e.g. 44 or timestamp
754 754
      * @access public
755 755
      */
Please login to merge, or discard this patch.
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
     {
89 89
         static $engine = false;
90 90
         switch (CALENDAR_ENGINE) {
91
-        case 'PearDate':
92
-            $class = 'Calendar_Engine_PearDate';
93
-            break;
94
-        case 'UnixTS':
95
-        default:
96
-            $class = 'PEAR\Calendar\Engine\UnixTS';
97
-            break;
91
+            case 'PearDate':
92
+                $class = 'Calendar_Engine_PearDate';
93
+                break;
94
+            case 'UnixTS':
95
+            default:
96
+                $class = 'PEAR\Calendar\Engine\UnixTS';
97
+                break;
98 98
         }
99 99
         if (!$engine) {
100 100
             if (!class_exists($class)) {
@@ -341,19 +341,19 @@  discard block
 block discarded – undo
341 341
     function returnValue($returnType, $format, $stamp, $default)
342 342
     {
343 343
         switch (strtolower($format)) {
344
-        case 'int':
345
-            return $default;
346
-        case 'array':
347
-            return $this->toArray($stamp);
348
-            break;
349
-        case 'object':
350
-            include_once CALENDAR_ROOT.'Factory.php';
351
-            return Factory::createByTimestamp($returnType, $stamp);
352
-            break;
353
-        case 'timestamp':
354
-        default:
355
-            return $stamp;
356
-            break;
344
+            case 'int':
345
+                return $default;
346
+            case 'array':
347
+                return $this->toArray($stamp);
348
+                break;
349
+            case 'object':
350
+                include_once CALENDAR_ROOT.'Factory.php';
351
+                return Factory::createByTimestamp($returnType, $stamp);
352
+                break;
353
+            case 'timestamp':
354
+            default:
355
+                return $stamp;
356
+                break;
357 357
         }
358 358
     }
359 359
 
Please login to merge, or discard this patch.