Completed
Push — master ( 26b490...31307f )
by Michael
03:13
created
rss.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-require_once __DIR__ . '/include/constantes.php';
5
-require_once __DIR__ . '/header.php';
3
+include __DIR__.'/../../mainfile.php';
4
+require_once __DIR__.'/include/constantes.php';
5
+require_once __DIR__.'/header.php';
6 6
 
7
-require_once XOOPS_ROOT_PATH . '/class/template.php';
7
+require_once XOOPS_ROOT_PATH.'/class/template.php';
8 8
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
9 9
 if (!isset($_GET['cat'])) {
10 10
     $cat = 0;
11 11
 } else {
12
-    $cat = (int)$_GET['cat'];
12
+    $cat = (int) $_GET['cat'];
13 13
 }
14 14
 if (function_exists('mb_http_output')) {
15 15
     mb_http_output('pass');
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
23 23
     if (is_array($events)) {
24 24
         $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
25
-        $tpl->assign('channel_link', XOOPS_URL . '/');
25
+        $tpl->assign('channel_link', XOOPS_URL.'/');
26 26
         $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
27 27
         $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
28 28
         $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
         $tpl->assign('channel_category', 'Event');
31 31
         $tpl->assign('channel_generator', 'XOOPS');
32 32
         $tpl->assign('channel_language', _LANGCODE);
33
-        $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png');
33
+        $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png');
34 34
         $tpl->assign('image_width', 92);
35 35
         $tpl->assign('image_height', 52);
36 36
         foreach ($events as $event) {
37 37
             $tpl->append('items', [
38 38
                 'title'       => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)),
39
-                'link'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
40
-                'guid'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
39
+                'link'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
40
+                'guid'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
41 41
                 'pubdate'     => formatTimestamp($event->getVar('event_start'), 'rss'),
42 42
                 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)),
43 43
             ]);
Please login to merge, or discard this patch.
class/eventmember.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23 23
 
24 24
 /**
25 25
  * Class ExtcalEventmember.
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         $eventMember   = $this->getObjects(new Criteria('event_id', $eventId));
86 86
         $count         = count($eventMember);
87 87
         if ($count > 0) {
88
-            $in = '(' . $eventMember[0]->getVar('uid');
88
+            $in = '('.$eventMember[0]->getVar('uid');
89 89
             array_shift($eventMember);
90 90
             foreach ($eventMember as $member) {
91
-                $in .= ',' . $member->getVar('uid');
91
+                $in .= ','.$member->getVar('uid');
92 92
             }
93
-            $in       .= ')';
93
+            $in .= ')';
94 94
             $criteria = new Criteria('uid', $in, 'IN');
95 95
         } else {
96 96
             $criteria = new Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/file.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
24 24
 
25 25
 /**
26 26
  * Class ExtcalFile.
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
         $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
69 69
 
70 70
         $allowedMimeType = [];
71
-        $mimeType        = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php';
71
+        $mimeType        = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php';
72 72
         foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) {
73 73
             $allowedMimeType[] = $mimeType[$fileExt];
74 74
         }
75 75
 
76
-        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728);
77
-        $uploader->setPrefix($userId . '-' . $eventId . '_');
76
+        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728);
77
+        $uploader->setPrefix($userId.'-'.$eventId.'_');
78 78
         if ($uploader->fetchMedia('event_file')) {
79 79
             if (!$uploader->upload()) {
80 80
                 return false;
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
         if (isset($_POST['filetokeep'])) {
136 136
             if (is_array($_POST['filetokeep'])) {
137 137
                 $count = count($_POST['filetokeep']);
138
-                $in    = '(' . $_POST['filetokeep'][0];
138
+                $in    = '('.$_POST['filetokeep'][0];
139 139
                 array_shift($_POST['filetokeep']);
140 140
                 foreach ($_POST['filetokeep'] as $elmt) {
141
-                    $in .= ',' . $elmt;
141
+                    $in .= ','.$elmt;
142 142
                 }
143 143
                 $in .= ')';
144 144
             } else {
145
-                $in = '(' . $_POST['filetokeep'] . ')';
145
+                $in = '('.$_POST['filetokeep'].')';
146 146
             }
147 147
             $criteria->add(new Criteria('file_id', $in, 'NOT IN'));
148 148
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     public function formatFileSize(&$file)
180 180
     {
181 181
         if ($file['file_size'] > 1000) {
182
-            $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb';
182
+            $file['formated_file_size'] = round($file['file_size'] / 1000).'kb';
183 183
         } else {
184 184
             $file['formated_file_size'] = '1kb';
185 185
         }
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function _deleteFile(&$file)
192 192
     {
193
-        if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) {
194
-            unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'));
193
+        if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) {
194
+            unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'));
195 195
         }
196 196
     }
197 197
 }
Please login to merge, or discard this patch.
class/eventnotmember.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23 23
 
24 24
 /**
25 25
  * Class ExtcalEventNotMember.
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         $eventNotMember = $this->getObjects(new Criteria('event_id', $eventId));
86 86
         $count          = count($eventNotMember);
87 87
         if ($count > 0) {
88
-            $in = '(' . $eventNotMember[0]->getVar('uid');
88
+            $in = '('.$eventNotMember[0]->getVar('uid');
89 89
             array_shift($eventNotMember);
90 90
             foreach ($eventNotMember as $member) {
91
-                $in .= ',' . $member->getVar('uid');
91
+                $in .= ','.$member->getVar('uid');
92 92
             }
93
-            $in       .= ')';
93
+            $in .= ')';
94 94
             $criteria = new Criteria('uid', $in, 'IN');
95 95
         } else {
96 96
             $criteria = new Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/cat.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/perm.php';
24
-require_once __DIR__ . '/time.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/perm.php';
24
+require_once __DIR__.'/time.php';
25 25
 
26 26
 /**
27 27
  * Class ExtcalCat.
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
204 204
         $count                = count($authorizedAccessCats);
205 205
         if ($count > 0) {
206
-            $in = '(' . $authorizedAccessCats[0];
206
+            $in = '('.$authorizedAccessCats[0];
207 207
             array_shift($authorizedAccessCats);
208 208
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
209
-                $in .= ',' . $authorizedAccessCat;
209
+                $in .= ','.$authorizedAccessCat;
210 210
             }
211 211
             $in .= ')';
212 212
             $criteria->add(new Criteria('cat_id', $in, 'IN'));
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 = [])
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);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth()
119 119
                 && $this->day == $sDate->thisDay()
120 120
                 && $this->hour == $sDate->thisHour()) {
121
-                $key = (int)$sDate->thisMinute();
121
+                $key = (int) $sDate->thisMinute();
122 122
                 if (isset($this->children[$key])) {
123 123
                     $sDate->setSelected();
124 124
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/1.php 2 patches
Switch Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -35,33 +35,33 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 switch (@$_GET['view']) {
38
-    default:
39
-        $_GET['view'] = 'calendar_year';
40
-        // no break
41
-    case 'calendar_year':
42
-        require_once CALENDAR_ROOT . 'Year.php';
43
-        $c = new Calendar_Year($_GET['y']);
44
-        break;
45
-    case 'calendar_month':
46
-        require_once CALENDAR_ROOT . 'Month.php';
47
-        $c = new Calendar_Month($_GET['y'], $_GET['m']);
48
-        break;
49
-    case 'calendar_day':
50
-        require_once CALENDAR_ROOT . 'Day.php';
51
-        $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
52
-        break;
53
-    case 'calendar_hour':
54
-        require_once CALENDAR_ROOT . 'Hour.php';
55
-        $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
56
-        break;
57
-    case 'calendar_minute':
58
-        require_once CALENDAR_ROOT . 'Minute.php';
59
-        $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
60
-        break;
61
-    case 'calendar_second':
62
-        require_once CALENDAR_ROOT . 'Second.php';
63
-        $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
64
-        break;
38
+        default:
39
+            $_GET['view'] = 'calendar_year';
40
+            // no break
41
+        case 'calendar_year':
42
+            require_once CALENDAR_ROOT . 'Year.php';
43
+            $c = new Calendar_Year($_GET['y']);
44
+            break;
45
+        case 'calendar_month':
46
+            require_once CALENDAR_ROOT . 'Month.php';
47
+            $c = new Calendar_Month($_GET['y'], $_GET['m']);
48
+            break;
49
+        case 'calendar_day':
50
+            require_once CALENDAR_ROOT . 'Day.php';
51
+            $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
52
+            break;
53
+        case 'calendar_hour':
54
+            require_once CALENDAR_ROOT . 'Hour.php';
55
+            $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
56
+            break;
57
+        case 'calendar_minute':
58
+            require_once CALENDAR_ROOT . 'Minute.php';
59
+            $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
60
+            break;
61
+        case 'calendar_second':
62
+            require_once CALENDAR_ROOT . 'Second.php';
63
+            $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
64
+            break;
65 65
 }
66 66
 
67 67
 echo 'Viewing: ' . @$_GET['view'] . '<br>';
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 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
 if (!@include 'Calendar/Calendar.php') {
@@ -39,33 +39,33 @@  discard block
 block discarded – undo
39 39
         $_GET['view'] = 'calendar_year';
40 40
         // no break
41 41
     case 'calendar_year':
42
-        require_once CALENDAR_ROOT . 'Year.php';
42
+        require_once CALENDAR_ROOT.'Year.php';
43 43
         $c = new Calendar_Year($_GET['y']);
44 44
         break;
45 45
     case 'calendar_month':
46
-        require_once CALENDAR_ROOT . 'Month.php';
46
+        require_once CALENDAR_ROOT.'Month.php';
47 47
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
48 48
         break;
49 49
     case 'calendar_day':
50
-        require_once CALENDAR_ROOT . 'Day.php';
50
+        require_once CALENDAR_ROOT.'Day.php';
51 51
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
52 52
         break;
53 53
     case 'calendar_hour':
54
-        require_once CALENDAR_ROOT . 'Hour.php';
54
+        require_once CALENDAR_ROOT.'Hour.php';
55 55
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
56 56
         break;
57 57
     case 'calendar_minute':
58
-        require_once CALENDAR_ROOT . 'Minute.php';
58
+        require_once CALENDAR_ROOT.'Minute.php';
59 59
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
60 60
         break;
61 61
     case 'calendar_second':
62
-        require_once CALENDAR_ROOT . 'Second.php';
62
+        require_once CALENDAR_ROOT.'Second.php';
63 63
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
64 64
         break;
65 65
 }
66 66
 
67
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
68
-echo 'The time is now: ' . date('Y M d H:i:s', $c->getTimestamp()) . '<br >';
67
+echo 'Viewing: '.@$_GET['view'].'<br>';
68
+echo 'The time is now: '.date('Y M d H:i:s', $c->getTimestamp()).'<br >';
69 69
 
70 70
 $i = 1;
71 71
 echo '<h1>First Iteration</h1>';
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
 $c->build();
76 76
 while ($e = $c->fetch()) {
77 77
     $class  = strtolower(get_class($e));
78
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
79
-    $method = 'this' . str_replace('calendar_', '', $class);
80
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
78
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
79
+    $method = 'this'.str_replace('calendar_', '', $class);
80
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
81 81
     if (0 == ($i % 10)) {
82 82
         echo '<br>';
83 83
     }
84 84
     ++$i;
85 85
 }
86
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
86
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
87 87
 
88 88
 $i = 1;
89 89
 echo '<h1>Second Iteration</h1>';
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 $start = getmicrotime();
93 93
 while ($e = $c->fetch()) {
94 94
     $class  = strtolower(get_class($e));
95
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
96
-    $method = 'this' . str_replace('calendar_', '', $class);
97
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
95
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
96
+    $method = 'this'.str_replace('calendar_', '', $class);
97
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
98 98
     if (0 == ($i % 10)) {
99 99
         echo '<br>';
100 100
     }
101 101
     ++$i;
102 102
 }
103
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
103
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
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'  => ['year' => 'int', 'month' => 'int'],
25 25
             'out' => ['month' => '{urn:PEAR_SOAP_Calendar}Month'],
26 26
         ];
27
-        $this->__typedef['Month']         = [
27
+        $this->__typedef['Month'] = [
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    = [
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/13.php 2 patches
Switch Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -39,33 +39,33 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 switch (@$_GET['view']) {
42
-    default:
43
-        $_GET['view'] = 'calendar_year';
44
-        // no break
45
-    case 'calendar_year':
46
-        require_once CALENDAR_ROOT . 'Year.php';
47
-        $c = new Calendar_Year($_GET['y']);
48
-        break;
49
-    case 'calendar_month':
50
-        require_once CALENDAR_ROOT . 'Month.php';
51
-        $c = new Calendar_Month($_GET['y'], $_GET['m']);
52
-        break;
53
-    case 'calendar_day':
54
-        require_once CALENDAR_ROOT . 'Day.php';
55
-        $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
56
-        break;
57
-    case 'calendar_hour':
58
-        require_once CALENDAR_ROOT . 'Hour.php';
59
-        $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
60
-        break;
61
-    case 'calendar_minute':
62
-        require_once CALENDAR_ROOT . 'Minute.php';
63
-        $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
64
-        break;
65
-    case 'calendar_second':
66
-        require_once CALENDAR_ROOT . 'Second.php';
67
-        $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
68
-        break;
42
+        default:
43
+            $_GET['view'] = 'calendar_year';
44
+            // no break
45
+        case 'calendar_year':
46
+            require_once CALENDAR_ROOT . 'Year.php';
47
+            $c = new Calendar_Year($_GET['y']);
48
+            break;
49
+        case 'calendar_month':
50
+            require_once CALENDAR_ROOT . 'Month.php';
51
+            $c = new Calendar_Month($_GET['y'], $_GET['m']);
52
+            break;
53
+        case 'calendar_day':
54
+            require_once CALENDAR_ROOT . 'Day.php';
55
+            $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
56
+            break;
57
+        case 'calendar_hour':
58
+            require_once CALENDAR_ROOT . 'Hour.php';
59
+            $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
60
+            break;
61
+        case 'calendar_minute':
62
+            require_once CALENDAR_ROOT . 'Minute.php';
63
+            $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
64
+            break;
65
+        case 'calendar_second':
66
+            require_once CALENDAR_ROOT . 'Second.php';
67
+            $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
68
+            break;
69 69
 }
70 70
 
71 71
 // Convert timestamp to human readable date
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     list($usec, $sec) = explode(' ', microtime());
11 11
 
12
-    return (float)$usec + (float)$sec;
12
+    return (float) $usec + (float) $sec;
13 13
 }
14 14
 
15 15
 // Switch to PEAR::Date engine
@@ -43,27 +43,27 @@  discard block
 block discarded – undo
43 43
         $_GET['view'] = 'calendar_year';
44 44
         // no break
45 45
     case 'calendar_year':
46
-        require_once CALENDAR_ROOT . 'Year.php';
46
+        require_once CALENDAR_ROOT.'Year.php';
47 47
         $c = new Calendar_Year($_GET['y']);
48 48
         break;
49 49
     case 'calendar_month':
50
-        require_once CALENDAR_ROOT . 'Month.php';
50
+        require_once CALENDAR_ROOT.'Month.php';
51 51
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
52 52
         break;
53 53
     case 'calendar_day':
54
-        require_once CALENDAR_ROOT . 'Day.php';
54
+        require_once CALENDAR_ROOT.'Day.php';
55 55
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
56 56
         break;
57 57
     case 'calendar_hour':
58
-        require_once CALENDAR_ROOT . 'Hour.php';
58
+        require_once CALENDAR_ROOT.'Hour.php';
59 59
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
60 60
         break;
61 61
     case 'calendar_minute':
62
-        require_once CALENDAR_ROOT . 'Minute.php';
62
+        require_once CALENDAR_ROOT.'Minute.php';
63 63
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
64 64
         break;
65 65
     case 'calendar_second':
66
-        require_once CALENDAR_ROOT . 'Second.php';
66
+        require_once CALENDAR_ROOT.'Second.php';
67 67
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
68 68
         break;
69 69
 }
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 $date = new Date($c->getTimestamp());
73 73
 
74 74
 echo '<h1>Using PEAR::Date engine</h1>';
75
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
76
-echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >';
75
+echo 'Viewing: '.@$_GET['view'].'<br>';
76
+echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >';
77 77
 
78 78
 $i = 1;
79 79
 echo '<h1>First Iteration</h1>';
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
 $c->build();
84 84
 while ($e = $c->fetch()) {
85 85
     $class  = strtolower(get_class($e));
86
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
87
-    $method = 'this' . str_replace('calendar_', '', $class);
88
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
86
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
87
+    $method = 'this'.str_replace('calendar_', '', $class);
88
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
89 89
     if (0 == ($i % 10)) {
90 90
         echo '<br>';
91 91
     }
92 92
     ++$i;
93 93
 }
94
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
94
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
95 95
 
96 96
 $i = 1;
97 97
 echo '<h1>Second Iteration</h1>';
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
 $start = getmicrotime();
101 101
 while ($e = $c->fetch()) {
102 102
     $class  = strtolower(get_class($e));
103
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
104
-    $method = 'this' . str_replace('calendar_', '', $class);
105
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
103
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
104
+    $method = 'this'.str_replace('calendar_', '', $class);
105
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
106 106
     if (0 == ($i % 10)) {
107 107
         echo '<br>';
108 108
     }
109 109
     ++$i;
110 110
 }
111
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
111
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
Please login to merge, or discard this patch.