@@ -1,10 +1,10 @@ discard block |
||
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__ . '/./calendar_test.php'; |
|
7 | +require_once __DIR__.'/./calendar_test.php'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Class TestOfMonthWeeks. |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function testSelection() |
149 | 149 | { |
150 | - require_once CALENDAR_ROOT . 'Week.php'; |
|
150 | + require_once CALENDAR_ROOT.'Week.php'; |
|
151 | 151 | $selection = array(new Calendar_Week(2003, 10, 12)); |
152 | 152 | $this->cal->build($selection); |
153 | 153 | $i = 1; |
@@ -1,10 +1,10 @@ discard block |
||
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__ . '/./calendar_test.php'; |
|
7 | +require_once __DIR__.'/./calendar_test.php'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Class TestOfHour. |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | public function testSelection() |
118 | 118 | { |
119 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
119 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
120 | 120 | $selection = array(new Calendar_Minute(2003, 10, 25, 13, 32)); |
121 | 121 | $this->cal->build($selection); |
122 | 122 | $i = 0; |
@@ -1,10 +1,10 @@ discard block |
||
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__ . '/./calendar_test.php'; |
|
7 | +require_once __DIR__.'/./calendar_test.php'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Class TestOfMinute. |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public function testSelection() |
113 | 113 | { |
114 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
114 | + require_once CALENDAR_ROOT.'Second.php'; |
|
115 | 115 | $selection = array(new Calendar_Second(2003, 10, 25, 13, 32, 43)); |
116 | 116 | $this->cal->build($selection); |
117 | 117 | $i = 0; |
@@ -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. |
@@ -1,10 +1,10 @@ discard block |
||
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__ . '/./calendar_test.php'; |
|
7 | +require_once __DIR__.'/./calendar_test.php'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Class TestOfDay. |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | public function testSelection() |
133 | 133 | { |
134 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
134 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
135 | 135 | $selection = array(new Calendar_Hour(2003, 10, 25, 13)); |
136 | 136 | $this->cal->build($selection); |
137 | 137 | $i = 0; |
@@ -8,7 +8,7 @@ discard block |
||
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') { |
@@ -38,33 +38,33 @@ discard block |
||
38 | 38 | default: |
39 | 39 | $_GET['view'] = 'calendar_year'; |
40 | 40 | case 'calendar_year': |
41 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
41 | + require_once CALENDAR_ROOT.'Year.php'; |
|
42 | 42 | $c = new Calendar_Year($_GET['y']); |
43 | 43 | break; |
44 | 44 | case 'calendar_month': |
45 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
45 | + require_once CALENDAR_ROOT.'Month.php'; |
|
46 | 46 | $c = new Calendar_Month($_GET['y'], $_GET['m']); |
47 | 47 | break; |
48 | 48 | case 'calendar_day': |
49 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
49 | + require_once CALENDAR_ROOT.'Day.php'; |
|
50 | 50 | $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
51 | 51 | break; |
52 | 52 | case 'calendar_hour': |
53 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
53 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
54 | 54 | $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
55 | 55 | break; |
56 | 56 | case 'calendar_minute': |
57 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
57 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
58 | 58 | $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
59 | 59 | break; |
60 | 60 | case 'calendar_second': |
61 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
61 | + require_once CALENDAR_ROOT.'Second.php'; |
|
62 | 62 | $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
63 | 63 | break; |
64 | 64 | } |
65 | 65 | |
66 | -echo 'Viewing: ' . @$_GET['view'] . '<br>'; |
|
67 | -echo 'The time is now: ' . date('Y M d H:i:s', $c->getTimestamp()) . '<br >'; |
|
66 | +echo 'Viewing: '.@$_GET['view'].'<br>'; |
|
67 | +echo 'The time is now: '.date('Y M d H:i:s', $c->getTimestamp()).'<br >'; |
|
68 | 68 | |
69 | 69 | $i = 1; |
70 | 70 | echo '<h1>First Iteration</h1>'; |
@@ -74,15 +74,15 @@ discard block |
||
74 | 74 | $c->build(); |
75 | 75 | while ($e = $c->fetch()) { |
76 | 76 | $class = strtolower(get_class($e)); |
77 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
78 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
79 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
77 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
78 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
79 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
80 | 80 | if (($i % 10) == 0) { |
81 | 81 | echo '<br>'; |
82 | 82 | } |
83 | 83 | ++$i; |
84 | 84 | } |
85 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
85 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
86 | 86 | |
87 | 87 | $i = 1; |
88 | 88 | echo '<h1>Second Iteration</h1>'; |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | $start = getmicrotime(); |
92 | 92 | while ($e = $c->fetch()) { |
93 | 93 | $class = strtolower(get_class($e)); |
94 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
95 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
96 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
94 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
95 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
96 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
97 | 97 | if (($i % 10) == 0) { |
98 | 98 | echo '<br>'; |
99 | 99 | } |
100 | 100 | ++$i; |
101 | 101 | } |
102 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
102 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |