Completed
Branch master (838035)
by Michael
03:45
created
htdocs/modules/extcal/class/pear/Calendar/Year.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 /**
48 48
  * Load Calendar base class
49 49
  */
50
-require_once CALENDAR_ROOT.'Calendar.php';
50
+require_once CALENDAR_ROOT . 'Calendar.php';
51 51
 
52 52
 /**
53 53
  * Represents a Year and builds Months<br>
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
      */
105 105
     function build($sDates = array(), $firstDay = null)
106 106
     {
107
-        include_once CALENDAR_ROOT.'Factory.php';
107
+        include_once CALENDAR_ROOT . 'Factory.php';
108 108
         $this->firstDay = $this->defineFirstDayOfWeek($firstDay);
109 109
         $monthsInYear   = $this->cE->getMonthsInYear($this->thisYear());
110
-        for ($i=1; $i <= $monthsInYear; ++$i) {
110
+        for ($i = 1; $i <= $monthsInYear; ++$i) {
111 111
             $this->children[$i] = Calendar_Factory::create('Month', $this->year, $i);
112 112
         }
113 113
         if (count($sDates) > 0) {
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Minute.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 /**
48 48
  * Load Calendar base class
49 49
  */
50
-require_once CALENDAR_ROOT.'Calendar.php';
50
+require_once CALENDAR_ROOT . 'Calendar.php';
51 51
 
52 52
 /**
53 53
  * Represents a Minute and builds Seconds
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
      */
97 97
     function build($sDates = array())
98 98
     {
99
-        include_once CALENDAR_ROOT.'Second.php';
99
+        include_once CALENDAR_ROOT . 'Second.php';
100 100
         $sIM = $this->cE->getSecondsInMinute($this->year, $this->month,
101 101
                 $this->day, $this->hour, $this->minute);
102
-        for ($i=0; $i < $sIM; ++$i) {
102
+        for ($i = 0; $i < $sIM; ++$i) {
103 103
             $this->children[$i] = new Calendar_Second($this->year, $this->month,
104 104
                 $this->day, $this->hour, $this->minute, $i);
105 105
         }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Calendar.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 /**
55 55
  * Define Calendar Month states
56 56
  */
57
-define('CALENDAR_USE_MONTH',          1);
57
+define('CALENDAR_USE_MONTH', 1);
58 58
 define('CALENDAR_USE_MONTH_WEEKDAYS', 2);
59
-define('CALENDAR_USE_MONTH_WEEKS',    3);
59
+define('CALENDAR_USE_MONTH_WEEKS', 3);
60 60
 
61 61
 /**
62 62
  * Contains a factory method to return a Singleton instance of a class
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
100
-                include_once CALENDAR_ROOT.'Engine'. '/' .CALENDAR_ENGINE.'.php';
100
+                include_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php';
101 101
             }
102 102
             $engine = new $class;
103 103
         }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      * @return array
313 313
      * @access public
314 314
      */
315
-    function toArray($stamp=null)
315
+    function toArray($stamp = null)
316 316
     {
317 317
         if (is_null($stamp)) {
318 318
             $stamp = $this->getTimeStamp();
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             return $this->toArray($stamp);
349 349
             break;
350 350
         case 'object':
351
-            include_once CALENDAR_ROOT.'Factory.php';
351
+            include_once CALENDAR_ROOT . 'Factory.php';
352 352
 
353 353
             return Calendar_Factory::createByTimestamp($returnType, $stamp);
354 354
             break;
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
     function & getValidator()
464 464
     {
465 465
         if (!isset($this->validator)) {
466
-            include_once CALENDAR_ROOT.'Validator.php';
466
+            include_once CALENDAR_ROOT . 'Validator.php';
467 467
             $this->validator = new Calendar_Validator($this);
468 468
         }
469 469
 
@@ -527,9 +527,9 @@  discard block
 block discarded – undo
527 527
      */
528 528
     function prevYear($format = 'int')
529 529
     {
530
-        $ts = $this->cE->dateToStamp($this->year-1, 1, 1, 0, 0, 0);
530
+        $ts = $this->cE->dateToStamp($this->year - 1, 1, 1, 0, 0, 0);
531 531
 
532
-        return $this->returnValue('Year', $format, $ts, $this->year-1);
532
+        return $this->returnValue('Year', $format, $ts, $this->year - 1);
533 533
     }
534 534
 
535 535
     /**
@@ -557,9 +557,9 @@  discard block
 block discarded – undo
557 557
      */
558 558
     function nextYear($format = 'int')
559 559
     {
560
-        $ts = $this->cE->dateToStamp($this->year+1, 1, 1, 0, 0, 0);
560
+        $ts = $this->cE->dateToStamp($this->year + 1, 1, 1, 0, 0, 0);
561 561
 
562
-        return $this->returnValue('Year', $format, $ts, $this->year+1);
562
+        return $this->returnValue('Year', $format, $ts, $this->year + 1);
563 563
     }
564 564
 
565 565
     /**
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      */
573 573
     function prevMonth($format = 'int')
574 574
     {
575
-        $ts = $this->cE->dateToStamp($this->year, $this->month-1, 1, 0, 0, 0);
575
+        $ts = $this->cE->dateToStamp($this->year, $this->month - 1, 1, 0, 0, 0);
576 576
 
577 577
         return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts));
578 578
     }
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     function nextMonth($format = 'int')
604 604
     {
605
-        $ts = $this->cE->dateToStamp($this->year, $this->month+1, 1, 0, 0, 0);
605
+        $ts = $this->cE->dateToStamp($this->year, $this->month + 1, 1, 0, 0, 0);
606 606
 
607 607
         return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts));
608 608
     }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
     function prevDay($format = 'int')
619 619
     {
620 620
         $ts = $this->cE->dateToStamp(
621
-            $this->year, $this->month, $this->day-1, 0, 0, 0);
621
+            $this->year, $this->month, $this->day - 1, 0, 0, 0);
622 622
 
623 623
         return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts));
624 624
     }
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
     function nextDay($format = 'int')
651 651
     {
652 652
         $ts = $this->cE->dateToStamp(
653
-            $this->year, $this->month, $this->day+1, 0, 0, 0);
653
+            $this->year, $this->month, $this->day + 1, 0, 0, 0);
654 654
 
655 655
         return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts));
656 656
     }
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
     function prevHour($format = 'int')
667 667
     {
668 668
         $ts = $this->cE->dateToStamp(
669
-            $this->year, $this->month, $this->day, $this->hour-1, 0, 0);
669
+            $this->year, $this->month, $this->day, $this->hour - 1, 0, 0);
670 670
 
671 671
         return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts));
672 672
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
     function nextHour($format = 'int')
699 699
     {
700 700
         $ts = $this->cE->dateToStamp(
701
-            $this->year, $this->month, $this->day, $this->hour+1, 0, 0);
701
+            $this->year, $this->month, $this->day, $this->hour + 1, 0, 0);
702 702
 
703 703
         return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts));
704 704
     }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
     {
716 716
         $ts = $this->cE->dateToStamp(
717 717
             $this->year, $this->month, $this->day,
718
-            $this->hour, $this->minute-1, 0);
718
+            $this->hour, $this->minute - 1, 0);
719 719
 
720 720
         return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts));
721 721
     }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
     {
750 750
         $ts = $this->cE->dateToStamp(
751 751
             $this->year, $this->month, $this->day,
752
-            $this->hour, $this->minute+1, 0);
752
+            $this->hour, $this->minute + 1, 0);
753 753
 
754 754
         return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts));
755 755
     }
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
     {
767 767
         $ts = $this->cE->dateToStamp(
768 768
             $this->year, $this->month, $this->day,
769
-            $this->hour, $this->minute, $this->second-1);
769
+            $this->hour, $this->minute, $this->second - 1);
770 770
 
771 771
         return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts));
772 772
     }
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
     {
801 801
         $ts = $this->cE->dateToStamp(
802 802
             $this->year, $this->month, $this->day,
803
-            $this->hour, $this->minute, $this->second+1);
803
+            $this->hour, $this->minute, $this->second + 1);
804 804
 
805 805
         return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts));
806 806
     }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Wrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Decorator to help with wrapping built children in another decorator
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Weekday.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load a Calendar_Day
55 55
  */
56
-require_once CALENDAR_ROOT.'Day.php';
56
+require_once CALENDAR_ROOT . 'Day.php';
57 57
 /**
58 58
  * Decorator for fetching the day of the week
59 59
  * <code>
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Uri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load the Uri utility
55 55
  */
56
-require_once CALENDAR_ROOT.'Util/Uri.php';
56
+require_once CALENDAR_ROOT . 'Util/Uri.php';
57 57
 
58 58
 /**
59 59
  * Decorator to help with building HTML links for navigating the calendar<br />
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/Decorator/Textual.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 /**
49 49
  * Load Calendar decorator base class
50 50
  */
51
-require_once CALENDAR_ROOT.'Decorator.php';
51
+require_once CALENDAR_ROOT . 'Decorator.php';
52 52
 
53 53
 /**
54 54
  * Load the Uri utility
55 55
  */
56
-require_once CALENDAR_ROOT.'Util/Textual.php';
56
+require_once CALENDAR_ROOT . 'Util/Textual.php';
57 57
 
58 58
 /**
59 59
  * Decorator to help with fetching textual representations of months and
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/time.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      */
96 96
     function getFormatedDate($format, $timestamp)
97 97
     {
98
-        $patterns     = array(
98
+        $patterns = array(
99 99
             '/January/',
100 100
             '/February/',
101 101
             '/March/',
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/perm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
         static $authorizedCat;
47 47
         $userId = ($user) ? $user->getVar('uid') : 0;
48 48
         if (!isset($authorizedCat[$perm][$userId])) {
49
-            $groupPermHandler =& xoops_gethandler('groupperm');
50
-            $moduleHandler    =& xoops_gethandler('module');
49
+            $groupPermHandler = & xoops_gethandler('groupperm');
50
+            $moduleHandler    = & xoops_gethandler('module');
51 51
             $module           = $moduleHandler->getByDirname('extcal');
52 52
             if (!$module) {
53 53
                 return false;
Please login to merge, or discard this patch.