Passed
Pull Request — master (#1)
by tsms
01:57 queued 25s
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.
Calendar/Week.php 1 patch
Switch Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -344,22 +344,22 @@  discard block
 block discarded – undo
344 344
     function prevWeek($format = 'n_in_month')
345 345
     {
346 346
         switch (strtolower($format)) {
347
-        case 'int':
348
-        case 'n_in_month':
349
-            return ($this->firstWeek) ? null : $this->thisWeek('n_in_month') -1;
350
-        case 'n_in_year':
351
-            return $this->cE->getWeekNInYear(
352
-                $this->cE->stampToYear($this->prevWeek),
353
-                $this->cE->stampToMonth($this->prevWeek),
354
-                $this->cE->stampToDay($this->prevWeek));
355
-        case 'array':
356
-            return $this->toArray($this->prevWeek);
357
-        case 'object':
358
-            include_once CALENDAR_ROOT.'Factory.php';
359
-            return Calendar_Factory::createByTimestamp('Week', $this->prevWeek);
360
-        case 'timestamp':
361
-        default:
362
-            return $this->prevWeek;
347
+            case 'int':
348
+            case 'n_in_month':
349
+                return ($this->firstWeek) ? null : $this->thisWeek('n_in_month') -1;
350
+            case 'n_in_year':
351
+                return $this->cE->getWeekNInYear(
352
+                    $this->cE->stampToYear($this->prevWeek),
353
+                    $this->cE->stampToMonth($this->prevWeek),
354
+                    $this->cE->stampToDay($this->prevWeek));
355
+            case 'array':
356
+                return $this->toArray($this->prevWeek);
357
+            case 'object':
358
+                include_once CALENDAR_ROOT.'Factory.php';
359
+                return Calendar_Factory::createByTimestamp('Week', $this->prevWeek);
360
+            case 'timestamp':
361
+            default:
362
+                return $this->prevWeek;
363 363
         }
364 364
     }
365 365
 
@@ -374,35 +374,35 @@  discard block
 block discarded – undo
374 374
     function thisWeek($format = 'n_in_month')
375 375
     {
376 376
         switch (strtolower($format)) {
377
-        case 'int':
378
-        case 'n_in_month':
379
-            if ($this->firstWeek) {
380
-                return 1;
381
-            }
382
-            if ($this->lastWeek) {
383
-                return $this->cE->getWeeksInMonth(
377
+            case 'int':
378
+            case 'n_in_month':
379
+                if ($this->firstWeek) {
380
+                    return 1;
381
+                }
382
+                if ($this->lastWeek) {
383
+                    return $this->cE->getWeeksInMonth(
384
+                        $this->thisYear(),
385
+                        $this->thisMonth(),
386
+                        $this->firstDay);
387
+                }
388
+                return $this->cE->getWeekNInMonth(
384 389
                     $this->thisYear(),
385 390
                     $this->thisMonth(),
391
+                    $this->thisDay(),
386 392
                     $this->firstDay);
387
-            }
388
-            return $this->cE->getWeekNInMonth(
389
-                $this->thisYear(),
390
-                $this->thisMonth(),
391
-                $this->thisDay(),
392
-                $this->firstDay);
393
-        case 'n_in_year':
394
-            return $this->cE->getWeekNInYear(
395
-                $this->cE->stampToYear($this->thisWeek),
396
-                $this->cE->stampToMonth($this->thisWeek),
397
-                $this->cE->stampToDay($this->thisWeek));
398
-        case 'array':
399
-            return $this->toArray($this->thisWeek);
400
-        case 'object':
401
-            include_once CALENDAR_ROOT.'Factory.php';
402
-            return Calendar_Factory::createByTimestamp('Week', $this->thisWeek);
403
-        case 'timestamp':
404
-        default:
405
-            return $this->thisWeek;
393
+            case 'n_in_year':
394
+                return $this->cE->getWeekNInYear(
395
+                    $this->cE->stampToYear($this->thisWeek),
396
+                    $this->cE->stampToMonth($this->thisWeek),
397
+                    $this->cE->stampToDay($this->thisWeek));
398
+            case 'array':
399
+                return $this->toArray($this->thisWeek);
400
+            case 'object':
401
+                include_once CALENDAR_ROOT.'Factory.php';
402
+                return Calendar_Factory::createByTimestamp('Week', $this->thisWeek);
403
+            case 'timestamp':
404
+            default:
405
+                return $this->thisWeek;
406 406
         }
407 407
     }
408 408
 
@@ -417,22 +417,22 @@  discard block
 block discarded – undo
417 417
     function nextWeek($format = 'n_in_month')
418 418
     {
419 419
         switch (strtolower($format)) {
420
-        case 'int':
421
-        case 'n_in_month':
422
-            return ($this->lastWeek) ? null : $this->thisWeek('n_in_month') +1;
423
-        case 'n_in_year':
424
-            return $this->cE->getWeekNInYear(
425
-                $this->cE->stampToYear($this->nextWeek),
426
-                $this->cE->stampToMonth($this->nextWeek),
427
-                $this->cE->stampToDay($this->nextWeek));
428
-        case 'array':
429
-            return $this->toArray($this->nextWeek);
430
-        case 'object':
431
-            include_once CALENDAR_ROOT.'Factory.php';
432
-            return Calendar_Factory::createByTimestamp('Week', $this->nextWeek);
433
-        case 'timestamp':
434
-        default:
435
-            return $this->nextWeek;
420
+            case 'int':
421
+            case 'n_in_month':
422
+                return ($this->lastWeek) ? null : $this->thisWeek('n_in_month') +1;
423
+            case 'n_in_year':
424
+                return $this->cE->getWeekNInYear(
425
+                    $this->cE->stampToYear($this->nextWeek),
426
+                    $this->cE->stampToMonth($this->nextWeek),
427
+                    $this->cE->stampToDay($this->nextWeek));
428
+            case 'array':
429
+                return $this->toArray($this->nextWeek);
430
+            case 'object':
431
+                include_once CALENDAR_ROOT.'Factory.php';
432
+                return Calendar_Factory::createByTimestamp('Week', $this->nextWeek);
433
+            case 'timestamp':
434
+            default:
435
+                return $this->nextWeek;
436 436
         }
437 437
     }
438 438
 
Please login to merge, or discard this patch.
Calendar/Hour.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@
 block discarded – undo
97 97
     {
98 98
         include_once CALENDAR_ROOT.'Minute.php';
99 99
         $mIH = $this->cE->getMinutesInHour($this->year, $this->month, $this->day,
100
-                           $this->hour);
100
+                            $this->hour);
101 101
         for ($i=0; $i < $mIH; $i++) {
102 102
             $this->children[$i] =
103 103
                 new Calendar_Minute($this->year, $this->month, $this->day,
104
-                           $this->hour, $i);
104
+                            $this->hour, $i);
105 105
         }
106 106
         if (count($sDates) > 0) {
107 107
             $this->setSelection($sDates);
Please login to merge, or discard this patch.
Calendar/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.
Calendar/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
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     {
88 88
         static $engine = false;
89 89
         switch (CALENDAR_ENGINE) {
90
-        case 'PearDate':
91
-            $class = 'Calendar_Engine_PearDate';
92
-            break;
93
-        case 'UnixTS':
94
-        default:
95
-            $class = 'Calendar_Engine_UnixTS';
96
-            break;
90
+            case 'PearDate':
91
+                $class = 'Calendar_Engine_PearDate';
92
+                break;
93
+            case 'UnixTS':
94
+            default:
95
+                $class = 'Calendar_Engine_UnixTS';
96
+                break;
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
@@ -340,19 +340,19 @@  discard block
 block discarded – undo
340 340
     function returnValue($returnType, $format, $stamp, $default)
341 341
     {
342 342
         switch (strtolower($format)) {
343
-        case 'int':
344
-            return $default;
345
-        case 'array':
346
-            return $this->toArray($stamp);
347
-            break;
348
-        case 'object':
349
-            include_once CALENDAR_ROOT.'Factory.php';
350
-            return Calendar_Factory::createByTimestamp($returnType, $stamp);
351
-            break;
352
-        case 'timestamp':
353
-        default:
354
-            return $stamp;
355
-            break;
343
+            case 'int':
344
+                return $default;
345
+            case 'array':
346
+                return $this->toArray($stamp);
347
+                break;
348
+            case 'object':
349
+                include_once CALENDAR_ROOT.'Factory.php';
350
+                return Calendar_Factory::createByTimestamp($returnType, $stamp);
351
+                break;
352
+            case 'timestamp':
353
+            default:
354
+                return $stamp;
355
+                break;
356 356
         }
357 357
     }
358 358
 
Please login to merge, or discard this patch.