Passed
Push — master ( 66eec6...f2a2b5 )
by Michael
02:23
created
class/pear/Calendar/docs/examples/11.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
  * Description: demonstrates a decorator used to "attach a payload" to a selection
4 4
  * to make it available when iterating over calendar children.
5 5
  */
6
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
6
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
7 7
     define('CALENDAR_ROOT', '../../');
8 8
 }
9
-require_once CALENDAR_ROOT . 'Day.php';
10
-require_once CALENDAR_ROOT . 'Hour.php';
11
-require_once CALENDAR_ROOT . 'Decorator.php';
9
+require_once CALENDAR_ROOT.'Day.php';
10
+require_once CALENDAR_ROOT.'Hour.php';
11
+require_once CALENDAR_ROOT.'Decorator.php';
12 12
 
13 13
 // Decorator to "attach" functionality to selected hours
14 14
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
         FROM
55 55
             diary
56 56
         WHERE
57
-            eventtime >= '" . $Day->thisDay(true) . "'
57
+            eventtime >= '" . $Day->thisDay(true)."'
58 58
         AND
59
-            eventtime < '" . $Day->nextDay(true) . "';";
59
+            eventtime < '" . $Day->nextDay(true)."';";
60 60
 
61 61
 // An array simulating data from a database
62 62
 $result = [
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
             // If the hour is selected, call the decorator method...
114 114
             if ($Hour->isSelected()) {
115
-                echo '<td bgcolor="silver">' . $Hour->getEntry() . "</td>\n";
115
+                echo '<td bgcolor="silver">'.$Hour->getEntry()."</td>\n";
116 116
             } else {
117 117
                 echo "<td>&nbsp;</td>\n";
118 118
             }
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/2.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 {
8 8
     list($usec, $sec) = explode(' ', microtime());
9 9
 
10
-    return (float)$usec + (float)$sec;
10
+    return (float) $usec + (float) $sec;
11 11
 }
12 12
 
13 13
 $start = getmicrotime();
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 // Force UnixTs engine (default setting)
16 16
 define('CALENDAR_ENGINE', 'UnixTS');
17 17
 
18
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
18
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
19 19
     define('CALENDAR_ROOT', '../../');
20 20
 }
21
-require_once CALENDAR_ROOT . 'Month/Weeks.php';
22
-require_once CALENDAR_ROOT . 'Day.php';
21
+require_once CALENDAR_ROOT.'Month/Weeks.php';
22
+require_once CALENDAR_ROOT.'Day.php';
23 23
 
24 24
 // Initialize GET variables if not set
25 25
 if (!isset($_GET['y'])) {
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
 // Construct strings for next/previous links
50 50
 $PMonth = $Month->prevMonth('object'); // Get previous month as object
51
-$prev   = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay();
51
+$prev   = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay();
52 52
 $NMonth = $Month->nextMonth('object');
53
-$next   = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay();
53
+$next   = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay();
54 54
 ?>
55 55
 <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
56 56
 <html>
@@ -124,19 +124,19 @@  discard block
 block discarded – undo
124 124
         while ($Day = $Week->fetch()) {
125 125
 
126 126
             // Build a link string for each day
127
-            $link = $_SERVER['PHP_SELF'] . '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay();
127
+            $link = $_SERVER['PHP_SELF'].'?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay();
128 128
 
129 129
             // Check to see if day is selected
130 130
             if ($Day->isSelected()) {
131
-                echo '<td class="selected">' . $Day->thisDay() . '</td>' . "\n";
131
+                echo '<td class="selected">'.$Day->thisDay().'</td>'."\n";
132 132
             // Check to see if day is empty
133 133
             } elseif ($Day->isEmpty()) {
134
-                echo '<td class="empty">' . $Day->thisDay() . '</td>' . "\n";
134
+                echo '<td class="empty">'.$Day->thisDay().'</td>'."\n";
135 135
             } else {
136
-                echo '<td><a href="' . $link . '">' . $Day->thisDay() . '</a></td>' . "\n";
136
+                echo '<td><a href="'.$link.'">'.$Day->thisDay().'</a></td>'."\n";
137 137
             }
138 138
         }
139
-        echo '</tr>' . "\n";
139
+        echo '</tr>'."\n";
140 140
     }
141 141
     ?>
142 142
     <tr>
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     </tr>
151 151
 </table>
152 152
 <?php
153
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
153
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
154 154
 ?>
155 155
 </body>
156 156
 </html>
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/16.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * Description: demonstrates using the Uri decorator.
4 4
  */
5
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
5
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
6 6
     define('CALENDAR_ROOT', '../../');
7 7
 }
8
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
9
-require_once CALENDAR_ROOT . 'Decorator/Uri.php';
8
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
9
+require_once CALENDAR_ROOT.'Decorator/Uri.php';
10 10
 
11 11
 if (!isset($_GET['jahr'])) {
12 12
     $_GET['jahr'] = date('Y');
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
 // Build the month
19 19
 $Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']);
20 20
 
21
-echo '<p>The current month is ' . $Calendar->thisMonth() . ' of year ' . $Calendar->thisYear() . '</p>';
21
+echo '<p>The current month is '.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>';
22 22
 
23 23
 $Uri = new Calendar_Decorator_Uri($Calendar);
24 24
 $Uri->setFragments('jahr', 'monat');
25 25
 // $Uri->setSeperator('/'); // Default is &
26 26
 // $Uri->setScalar(); // Omit variable names
27
-echo "<pre>Previous Uri:\t" . $Uri->prev('month') . "\n";
28
-echo "This Uri:\t" . $Uri->this('month') . "\n";
29
-echo "Next Uri:\t" . $Uri->next('month') . "\n</pre>";
27
+echo "<pre>Previous Uri:\t".$Uri->prev('month')."\n";
28
+echo "This Uri:\t".$Uri->this('month')."\n";
29
+echo "Next Uri:\t".$Uri->next('month')."\n</pre>";
30 30
 ?>
31 31
 <p>
32
-    <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->prev('month'); ?>">Prev</a> :
33
-    <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->next('month'); ?>">Next</a>
32
+    <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->prev('month'); ?>">Prev</a> :
33
+    <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->next('month'); ?>">Next</a>
34 34
 </p>
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/12.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
 {
7 7
     list($usec, $sec) = explode(' ', microtime());
8 8
 
9
-    return (float)$usec + (float)$sec;
9
+    return (float) $usec + (float) $sec;
10 10
 }
11 11
 
12 12
 $start = getmicrotime();
13 13
 
14
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
14
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
15 15
     define('CALENDAR_ROOT', '../../');
16 16
 }
17 17
 
18
-require_once CALENDAR_ROOT . 'Year.php';
18
+require_once CALENDAR_ROOT.'Year.php';
19 19
 
20 20
 define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH_WEEKDAYS);
21 21
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         }
101 101
 
102 102
         echo "<td>\n<table class=\"month\">\n";
103
-        echo '<caption class="month">' . date('F', $Month->thisMonth(true)) . '</caption>';
103
+        echo '<caption class="month">'.date('F', $Month->thisMonth(true)).'</caption>';
104 104
         echo "<tr>\n<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>";
105 105
         $Month->build();
106 106
         while ($Day = $Month->fetch()) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             if ($Day->isEmpty()) {
111 111
                 echo "<td>&nbsp;</td>\n";
112 112
             } else {
113
-                echo '<td>' . $Day->thisDay() . "</td>\n";
113
+                echo '<td>'.$Day->thisDay()."</td>\n";
114 114
             }
115 115
             if ($Day->isLast()) {
116 116
                 echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/20.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 //if you use ISO-8601 dates, switch to PearDate engine
8 8
 define('CALENDAR_ENGINE', 'PearDate');
9 9
 
10
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
10
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
11 11
     define('CALENDAR_ROOT', '../../');
12 12
 }
13 13
 
14
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
15
-require_once CALENDAR_ROOT . 'Day.php';
16
-require_once CALENDAR_ROOT . 'Decorator.php';
14
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
15
+require_once CALENDAR_ROOT.'Day.php';
16
+require_once CALENDAR_ROOT.'Decorator.php';
17 17
 
18 18
 // accepts multiple entries
19 19
 
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function build($events = [])
78 78
     {
79
-        require_once CALENDAR_ROOT . 'Day.php';
80
-        require_once CALENDAR_ROOT . 'Table/Helper.php';
79
+        require_once CALENDAR_ROOT.'Day.php';
80
+        require_once CALENDAR_ROOT.'Table/Helper.php';
81 81
 
82 82
         $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay);
83 83
         $this->cE          = $this->getEngine();
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 <h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2>
232 232
 <table class="calendar" width="98%" cellspacing="0" cellpadding="0">
233 233
     <caption>
234
-        <?php echo $MonthDecorator->thisMonth() . ' / ' . $MonthDecorator->thisYear(); ?>
234
+        <?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?>
235 235
     </caption>
236 236
     <tr>
237 237
         <th>Monday</th>
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
             echo ' calCellEmpty';
256 256
         }
257 257
         echo '">';
258
-        echo '<div class="dayNumber">' . $Day->thisDay() . '</div>';
258
+        echo '<div class="dayNumber">'.$Day->thisDay().'</div>';
259 259
 
260 260
         if ($Day->isEmpty()) {
261 261
             echo '&nbsp;';
262 262
         } else {
263 263
             echo '<div class="dayContents"><ul>';
264 264
             while ($entry = $Day->getEntry()) {
265
-                echo '<li>' . $entry['desc'] . '</li>';
265
+                echo '<li>'.$entry['desc'].'</li>';
266 266
                 //you can print the time range as well
267 267
             }
268 268
             echo '</ul></div>';
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/6.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@  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
 $start = getmicrotime();
15 15
 
16 16
 //if (!@require_once dirname(dirname(__DIR__)) . '/Calendar.php') {
17
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
17
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
18 18
     define('CALENDAR_ROOT', '../../');
19 19
 }
20
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
21
-require_once CALENDAR_ROOT . 'Day.php';
20
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
21
+require_once CALENDAR_ROOT.'Day.php';
22 22
 
23 23
 if (!isset($_GET['y'])) {
24 24
     $_GET['y'] = date('Y');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 <anchor>
50 50
                     Back to Month View
51 51
                     <go href="<?php
52
-                    echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '&amp;mime=wml'; ?>">
52
+                    echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;mime=wml'; ?>">
53 53
                 </anchor>
54 54
             </p>
55 55
             <table>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 $Day->build();
58 58
             while ($Hour = $Day->fetch()) {
59 59
                 echo "<tr>\n";
60
-                echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
60
+                echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
61 61
                 echo "</tr>\n";
62 62
             } ?>
63 63
             </table>
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
                 if ($Day->isEmpty()) {
85 85
                     echo "<td></td>\n";
86 86
                 } elseif ($Day->isSelected()) {
87
-                    echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . "&amp;mime=wml\">\n</anchor></td>\n";
87
+                    echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\">\n</anchor></td>\n";
88 88
                 } else {
89
-                    echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&amp;y=" . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . "&amp;mime=wml\"></anchor></td>\n";
89
+                    echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&amp;y=".$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\"></anchor></td>\n";
90 90
                 }
91 91
                 if ($Day->isLast()) {
92 92
                     echo "</tr>\n";
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                         <anchor>
98 98
                             &lt;&lt;
99 99
                             <go href="<?php
100
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>">
100
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>">
101 101
                         </anchor>
102 102
                     </td>
103 103
                     <td></td>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                         <anchor>
110 110
                             &gt;&gt;
111 111
                             <go href="<?php
112
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>">
112
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>">
113 113
                         </anchor>
114 114
                     </td>
115 115
                 </tr>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             <?php
119 119
         } ?>
120 120
         <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p>
121
-        <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?>
121
+        <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?>
122 122
     </wml>
123 123
     <?php
124 124
     #-----------------------------------------------------------------------------#
@@ -142,14 +142,14 @@  discard block
 block discarded – undo
142 142
         <p>
143 143
             <anchor>
144 144
                 <a href="<?php
145
-                echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay(); ?>">Back to Month View</a>
145
+                echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay(); ?>">Back to Month View</a>
146 146
         </p>
147 147
         <table>
148 148
             <?php
149 149
             $Day->build();
150 150
         while ($Hour = $Day->fetch()) {
151 151
             echo "<tr>\n";
152
-            echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
152
+            echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
153 153
             echo "</tr>\n";
154 154
         } ?>
155 155
         </table>
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
             if ($Day->isEmpty()) {
177 177
                 echo "<td></td>\n";
178 178
             } elseif ($Day->isSelected()) {
179
-                echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '&amp;wml"><strong><u>' . $Day->thisDay() . "</u></strong></a></td>\n";
179
+                echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;wml"><strong><u>'.$Day->thisDay()."</u></strong></a></td>\n";
180 180
             } else {
181
-                echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '">' . $Day->thisDay() . "</a></td>\n";
181
+                echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'">'.$Day->thisDay()."</a></td>\n";
182 182
             }
183 183
             if ($Day->isLast()) {
184 184
                 echo "</tr>\n";
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             <tr>
188 188
                 <td>
189 189
                     <a href="<?php
190
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay(); ?>">
190
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay(); ?>">
191 191
                         &lt;&lt;</a>
192 192
                 </td>
193 193
                 <td></td>
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 <td></td>
198 198
                 <td>
199 199
                     <a href="<?php
200
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay(); ?>">&gt;&gt;</a>
200
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay(); ?>">&gt;&gt;</a>
201 201
                 </td>
202 202
             </tr>
203 203
         </table>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         <?php
206 206
     } ?>
207 207
 
208
-    <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?>
208
+    <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?>
209 209
     </body>
210 210
     </html>
211 211
     <?php
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/23.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Description: demonstrates using the Textual util.
5 5
  */
6
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
6
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
7 7
     define('CALENDAR_ROOT', '../../');
8 8
 }
9
-require_once CALENDAR_ROOT . 'Day.php';
10
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
11
-require_once CALENDAR_ROOT . 'Util/Textual.php';
9
+require_once CALENDAR_ROOT.'Day.php';
10
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
11
+require_once CALENDAR_ROOT.'Util/Textual.php';
12 12
 
13 13
 // Could change language like this
14 14
 // setlocale (LC_TIME, "de_DE"); // Unix based (probably)
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br>";
26 26
 $Calendar = new Calendar_Day(date('Y'), date('n'), date('d'));
27 27
 
28
-echo '<hr>Previous month is: ' . Calendar_Util_Textual::prevMonthName($Calendar, 'two') . '<br>';
29
-echo 'This month is: ' . Calendar_Util_Textual::thisMonthName($Calendar, 'short') . '<br>';
30
-echo 'Next month is: ' . Calendar_Util_Textual::nextMonthName($Calendar) . '<br><hr>';
31
-echo 'Previous day is: ' . Calendar_Util_Textual::prevDayName($Calendar) . '<br>';
32
-echo 'This day is: ' . Calendar_Util_Textual::thisDayName($Calendar, 'short') . '<br>';
33
-echo 'Next day is: ' . Calendar_Util_Textual::nextDayName($Calendar, 'one') . '<br><hr>';
28
+echo '<hr>Previous month is: '.Calendar_Util_Textual::prevMonthName($Calendar, 'two').'<br>';
29
+echo 'This month is: '.Calendar_Util_Textual::thisMonthName($Calendar, 'short').'<br>';
30
+echo 'Next month is: '.Calendar_Util_Textual::nextMonthName($Calendar).'<br><hr>';
31
+echo 'Previous day is: '.Calendar_Util_Textual::prevDayName($Calendar).'<br>';
32
+echo 'This day is: '.Calendar_Util_Textual::thisDayName($Calendar, 'short').'<br>';
33
+echo 'Next day is: '.Calendar_Util_Textual::nextDayName($Calendar, 'one').'<br><hr>';
34 34
 
35 35
 echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br>";
36 36
 $Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6);
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
 ?>
39 39
 <p>Rendering calendar....</p>
40 40
 <table>
41
-    <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar) . ' ' . $Calendar->thisYear(); ?></caption>
41
+    <caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar).' '.$Calendar->thisYear(); ?></caption>
42 42
     <tr>
43 43
         <?php
44 44
         $dayheaders = Calendar_Util_Textual::orderedWeekdays($Calendar, 'short');
45 45
         foreach ($dayheaders as $dayheader) {
46
-            echo '<th>' . $dayheader . '</th>';
46
+            echo '<th>'.$dayheader.'</th>';
47 47
         }
48 48
         ?>
49 49
     </tr>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if ($Day->isEmpty()) {
57 57
             echo '<td>&nbsp;</td>';
58 58
         } else {
59
-            echo '<td>' . $Day->thisDay() . '</td>';
59
+            echo '<td>'.$Day->thisDay().'</td>';
60 60
         }
61 61
         if ($Day->isLast()) {
62 62
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/17.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Description: demonstrates using the Textual decorator.
5 5
  */
6
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
6
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
7 7
     define('CALENDAR_ROOT', '../../');
8 8
 }
9
-require_once CALENDAR_ROOT . 'Day.php';
10
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
11
-require_once CALENDAR_ROOT . 'Decorator/Textual.php';
9
+require_once CALENDAR_ROOT.'Day.php';
10
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
11
+require_once CALENDAR_ROOT.'Decorator/Textual.php';
12 12
 
13 13
 // Could change language like this
14 14
 // setlocale (LC_TIME, "de_DE"); // Unix based (probably)
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 // Decorate
29 29
 $Textual = new Calendar_Decorator_Textual($Calendar);
30 30
 
31
-echo '<hr>Previous month is: ' . $Textual->prevMonthName('two') . '<br>';
32
-echo 'This month is: ' . $Textual->thisMonthName('short') . '<br>';
33
-echo 'Next month is: ' . $Textual->nextMonthName() . '<br><hr>';
34
-echo 'Previous day is: ' . $Textual->prevDayName() . '<br>';
35
-echo 'This day is: ' . $Textual->thisDayName('short') . '<br>';
36
-echo 'Next day is: ' . $Textual->nextDayName('one') . '<br><hr>';
31
+echo '<hr>Previous month is: '.$Textual->prevMonthName('two').'<br>';
32
+echo 'This month is: '.$Textual->thisMonthName('short').'<br>';
33
+echo 'Next month is: '.$Textual->nextMonthName().'<br><hr>';
34
+echo 'Previous day is: '.$Textual->prevDayName().'<br>';
35
+echo 'This day is: '.$Textual->thisDayName('short').'<br>';
36
+echo 'Next day is: '.$Textual->nextDayName('one').'<br><hr>';
37 37
 
38 38
 echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br>";
39 39
 $Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 ?>
44 44
 <p>Rendering calendar....</p>
45 45
 <table>
46
-    <caption><?php echo $Textual->thisMonthName() . ' ' . $Textual->thisYear(); ?></caption>
46
+    <caption><?php echo $Textual->thisMonthName().' '.$Textual->thisYear(); ?></caption>
47 47
     <tr>
48 48
         <?php
49 49
         $dayheaders = $Textual->orderedWeekdays('short');
50 50
         foreach ($dayheaders as $dayheader) {
51
-            echo '<th>' . $dayheader . '</th>';
51
+            echo '<th>'.$dayheader.'</th>';
52 52
         }
53 53
         ?>
54 54
     </tr>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         if ($Day->isEmpty()) {
62 62
             echo '<td>&nbsp;</td>';
63 63
         } else {
64
-            echo '<td>' . $Day->thisDay() . '</td>';
64
+            echo '<td>'.$Day->thisDay().'</td>';
65 65
         }
66 66
         if ($Day->isLast()) {
67 67
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/10.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * hit for extra method calls. For this example some simple functions could help
7 7
  * format the month while the days are accessed via the normal Month object.
8 8
  */
9
-if (!@require_once __DIR__   . '/Calendar/Calendar.php') {
9
+if (!@require_once __DIR__.'/Calendar/Calendar.php') {
10 10
     define('CALENDAR_ROOT', '../../');
11 11
 }
12
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
13
-require_once CALENDAR_ROOT . 'Decorator.php';
12
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
13
+require_once CALENDAR_ROOT.'Decorator.php';
14 14
 
15 15
 // Decorate a Month with methods to improve formatting
16 16
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $prevStamp = parent::prevMonth(true);
38 38
 
39 39
         // Build the URL for the previous month
40
-        return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $prevStamp) . '&m=' . date('n', $prevStamp) . '&d=' . date('j', $prevStamp);
40
+        return $_SERVER['PHP_SELF'].'?y='.date('Y', $prevStamp).'&m='.date('n', $prevStamp).'&d='.date('j', $prevStamp);
41 41
     }
42 42
 
43 43
     /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $nextStamp = parent::nextMonth(true);
60 60
 
61 61
         // Build the URL for next month
62
-        return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $nextStamp) . '&m=' . date('n', $nextStamp) . '&d=' . date('j', $nextStamp);
62
+        return $_SERVER['PHP_SELF'].'?y='.date('Y', $nextStamp).'&m='.date('n', $nextStamp).'&d='.date('j', $nextStamp);
63 63
     }
64 64
 }
65 65
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         if ($Day->isEmpty()) {
96 96
             echo '<td>&nbsp;</td>';
97 97
         } else {
98
-            echo '<td>' . $Day->thisDay() . '</td>';
98
+            echo '<td>'.$Day->thisDay().'</td>';
99 99
         }
100 100
         if ($Day->isLast()) {
101 101
             echo "\n</tr>\n";
Please login to merge, or discard this patch.