@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/simple_include.php'; |
|
| 5 | -require_once __DIR__ . '/calendar_include.php'; |
|
| 4 | +require_once __DIR__.'/simple_include.php'; |
|
| 5 | +require_once __DIR__.'/calendar_include.php'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Class ValidatorTests. |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/simple_include.php'; |
|
| 5 | -require_once __DIR__ . '/calendar_include.php'; |
|
| 4 | +require_once __DIR__.'/simple_include.php'; |
|
| 5 | +require_once __DIR__.'/calendar_include.php'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Class TableHelperTests. |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/simple_include.php'; |
|
| 5 | -require_once __DIR__ . '/calendar_include.php'; |
|
| 4 | +require_once __DIR__.'/simple_include.php'; |
|
| 5 | +require_once __DIR__.'/calendar_include.php'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Class CalendarTests. |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/simple_include.php'; |
|
| 5 | -require_once __DIR__ . '/calendar_include.php'; |
|
| 4 | +require_once __DIR__.'/simple_include.php'; |
|
| 5 | +require_once __DIR__.'/calendar_include.php'; |
|
| 6 | 6 | |
| 7 | -require_once __DIR__ . '/./decorator_test.php'; |
|
| 7 | +require_once __DIR__.'/./decorator_test.php'; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * Class TestOfDecoratorUri. |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // |
| 3 | 3 | |
| 4 | -require_once __DIR__ . '/simple_include.php'; |
|
| 5 | -require_once __DIR__ . '/calendar_include.php'; |
|
| 4 | +require_once __DIR__.'/simple_include.php'; |
|
| 5 | +require_once __DIR__.'/calendar_include.php'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Class UtilTests. |
@@ -6,7 +6,7 @@ discard block |
||
| 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(); |
@@ -15,8 +15,8 @@ discard block |
||
| 15 | 15 | define('CALENDAR_ROOT', '../../'); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -require_once CALENDAR_ROOT . 'Year.php'; |
|
| 19 | -require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
|
| 18 | +require_once CALENDAR_ROOT.'Year.php'; |
|
| 19 | +require_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
| 20 | 20 | |
| 21 | 21 | define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH_WEEKS); |
| 22 | 22 | |
@@ -124,20 +124,20 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | echo "<td>\n<table class=\"month\">\n"; |
| 127 | - echo '<caption class="month">' . date('F', $Month->thisMonth(true)) . '</caption>'; |
|
| 128 | - echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>' . "\n"; |
|
| 127 | + echo '<caption class="month">'.date('F', $Month->thisMonth(true)).'</caption>'; |
|
| 128 | + echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>'."\n"; |
|
| 129 | 129 | echo "<tr>\n<th>Week</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>"; |
| 130 | 130 | $Month->build(); |
| 131 | 131 | while ($Week = $Month->fetch()) { |
| 132 | 132 | echo "<tr>\n"; |
| 133 | - echo '<td>' . $Week->thisWeek($_GET['week_type']) . "</td>\n"; |
|
| 133 | + echo '<td>'.$Week->thisWeek($_GET['week_type'])."</td>\n"; |
|
| 134 | 134 | $Week->build(); |
| 135 | 135 | |
| 136 | 136 | while ($Day = $Week->fetch()) { |
| 137 | 137 | if ($Day->isEmpty()) { |
| 138 | 138 | echo "<td> </td>\n"; |
| 139 | 139 | } else { |
| 140 | - echo '<td>' . $Day->thisDay() . "</td>\n"; |
|
| 140 | + echo '<td>'.$Day->thisDay()."</td>\n"; |
|
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 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(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | if (!@include 'Calendar/Calendar.php') { |
| 15 | 15 | define('CALENDAR_ROOT', '../../'); |
| 16 | 16 | } |
| 17 | -require_once CALENDAR_ROOT . 'Week.php'; |
|
| 17 | +require_once CALENDAR_ROOT.'Week.php'; |
|
| 18 | 18 | |
| 19 | 19 | if (!isset($_GET['y'])) { |
| 20 | 20 | $_GET['y'] = date('Y'); |
@@ -42,19 +42,19 @@ discard block |
||
| 42 | 42 | </head> |
| 43 | 43 | <body> |
| 44 | 44 | <h1>Paging Weeks</h1> |
| 45 | -<h2>Week: <?php echo $Week->thisWeek() . ' ' . date('F Y', $Week->thisMonth(true)); ?></h2> |
|
| 45 | +<h2>Week: <?php echo $Week->thisWeek().' '.date('F Y', $Week->thisMonth(true)); ?></h2> |
|
| 46 | 46 | <?php |
| 47 | 47 | $Week->build(); |
| 48 | 48 | while ($Day = $Week->fetch()) { |
| 49 | - echo '<p>' . date('jS F', $Day->thisDay(true)) . "</p>\n"; |
|
| 49 | + echo '<p>'.date('jS F', $Day->thisDay(true))."</p>\n"; |
|
| 50 | 50 | } |
| 51 | 51 | $days = $Week->fetchAll(); |
| 52 | 52 | |
| 53 | 53 | $prevWeek = $Week->prevWeek('array'); |
| 54 | -$prevWeekLink = $_SERVER['PHP_SELF'] . '?y=' . $prevWeek['year'] . '&m=' . $prevWeek['month'] . '&d=' . $prevWeek['day']; |
|
| 54 | +$prevWeekLink = $_SERVER['PHP_SELF'].'?y='.$prevWeek['year'].'&m='.$prevWeek['month'].'&d='.$prevWeek['day']; |
|
| 55 | 55 | |
| 56 | 56 | $nextWeek = $Week->nextWeek('array'); |
| 57 | -$nextWeekLink = $_SERVER['PHP_SELF'] . '?y=' . $nextWeek['year'] . '&m=' . $nextWeek['month'] . '&d=' . $nextWeek['day']; |
|
| 57 | +$nextWeekLink = $_SERVER['PHP_SELF'].'?y='.$nextWeek['year'].'&m='.$nextWeek['month'].'&d='.$nextWeek['day']; |
|
| 58 | 58 | ?> |
| 59 | 59 | <p><a href="<?php echo $prevWeekLink; ?>"><<</a> | <a href="<?php echo $nextWeekLink; ?>">>></a></p> |
| 60 | 60 | </body> |
@@ -7,7 +7,7 @@ discard block |
||
| 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(); |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | if (!@include 'Calendar/Calendar.php') { |
| 19 | 19 | define('CALENDAR_ROOT', '../../'); |
| 20 | 20 | } |
| 21 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
| 22 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
| 21 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
| 22 | +require_once CALENDAR_ROOT.'Day.php'; |
|
| 23 | 23 | |
| 24 | 24 | // Initialize GET variables if not set |
| 25 | 25 | if (!isset($_GET['y'])) { |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | // Construct strings for next/previous links |
| 49 | 49 | $PMonth = $month->prevMonth('object'); // Get previous month as object |
| 50 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
| 50 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
| 51 | 51 | $NMonth = $month->nextMonth('object'); |
| 52 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
| 52 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
| 53 | 53 | |
| 54 | 54 | $thisDate = new Date($month->thisMonth('timestamp')); |
| 55 | 55 | ?> |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | <?php |
| 117 | 117 | while ($day = $month->fetch()) { |
| 118 | 118 | // Build a link string for each day |
| 119 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $day->thisYear() . '&m=' . $day->thisMonth() . '&d=' . $day->thisDay(); |
|
| 119 | + $link = $_SERVER['PHP_SELF'].'?y='.$day->thisYear().'&m='.$day->thisMonth().'&d='.$day->thisDay(); |
|
| 120 | 120 | |
| 121 | 121 | // isFirst() to find start of week |
| 122 | 122 | if ($day->isFirst()) { |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if ($day->isSelected()) { |
| 127 | - echo '<td class="selected">' . $day->thisDay() . '</td>' . "\n"; |
|
| 127 | + echo '<td class="selected">'.$day->thisDay().'</td>'."\n"; |
|
| 128 | 128 | } elseif ($day->isEmpty()) { |
| 129 | - echo '<td> </td>' . "\n"; |
|
| 129 | + echo '<td> </td>'."\n"; |
|
| 130 | 130 | } else { |
| 131 | - echo '<td><a href="' . $link . '">' . $day->thisDay() . '</a></td>' . "\n"; |
|
| 131 | + echo '<td><a href="'.$link.'">'.$day->thisDay().'</a></td>'."\n"; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | // isLast() to find end of week |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | </tr> |
| 149 | 149 | </table> |
| 150 | 150 | <?php |
| 151 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
| 151 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
| 152 | 152 | ?> |
| 153 | 153 | </body> |
| 154 | 154 | </html> |
@@ -7,7 +7,7 @@ discard block |
||
| 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(); |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | if (!@include '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 |
||
| 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 |
||
| 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 |
||
| 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> |