@@ -5,10 +5,10 @@ discard block |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | // Get environment & autoloader and the $app-object. |
8 | -require __DIR__.'/config.php'; |
|
8 | +require __DIR__ . '/config.php'; |
|
9 | 9 | |
10 | 10 | // Create services and inject into the app. |
11 | -$di = new \Anax\DI\CDIFactory(); |
|
11 | +$di = new \Anax\DI\CDIFactory(); |
|
12 | 12 | |
13 | 13 | |
14 | 14 | |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | |
19 | 19 | // On production server, set pretty urls and use rewrite in .htaccess |
20 | 20 | $app->url->setUrlType( |
21 | - ($_SERVER['SERVER_NAME']=='localhost') ? |
|
21 | + ($_SERVER[ 'SERVER_NAME' ] == 'localhost') ? |
|
22 | 22 | \Anax\Url\CUrl::URL_APPEND : \Anax\Url\CUrl::URL_CLEAN |
23 | 23 | ); |
24 | 24 | |
25 | 25 | |
26 | -$app->router->add('', function () use ($app) { |
|
26 | +$app->router->add('', function() use ($app) { |
|
27 | 27 | $app->theme->setTitle("Calendar test"); |
28 | 28 | |
29 | 29 | $app->views->add('default/page', [ |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | }); |
40 | 40 | |
41 | 41 | // Route to calendar |
42 | -$app->router->add('calendar', function () use ($app) { |
|
42 | +$app->router->add('calendar', function() use ($app) { |
|
43 | 43 | $app->theme->addStylesheet('css/calendar.css'); |
44 | 44 | $app->theme->setTitle("Calendar"); |
45 | 45 |
@@ -128,17 +128,17 @@ |
||
128 | 128 | $date = $this->firstDayInWeekOfMonth; |
129 | 129 | while ($date <= $this->lastDayInLastWeek) { |
130 | 130 | $w = ltrim($date->format('W'), 0); |
131 | - for ($d=1; $d < 8; $d++) { |
|
131 | + for ($d = 1; $d < 8; $d++) { |
|
132 | 132 | // $dateText = utf8_encode(strftime("%A %e %B", strtotime($date->format('Y-m-d')))); |
133 | 133 | // %e does not work on windows, use %d instead |
134 | 134 | $dateText = utf8_encode(strftime("%A %#d %B", strtotime($date->format('Y-m-d')))); |
135 | 135 | $dateText = $date->format('d M'); |
136 | 136 | // $dateText = $date->format('D d M'); |
137 | - $redDay = (7==$d) ? "red-day" : ""; |
|
137 | + $redDay = (7 == $d) ? "red-day" : ""; |
|
138 | 138 | $classToday = ($date == $this->today) ? "today" : ""; |
139 | 139 | $classThisMonth = ($date < $this->firstDayInMonth || $date > $this->lastDayInMonth) ? "class-outside-month" : "class-inside-month"; |
140 | 140 | $date->modify("+1 day"); |
141 | - $dates[] = array( |
|
141 | + $dates[ ] = array( |
|
142 | 142 | 'week' => $w, |
143 | 143 | 'date' => $dateText, |
144 | 144 | 'class-red' => $redDay, |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @return void |
13 | 13 | */ |
14 | 14 | spl_autoload_register( |
15 | - function ($class) { |
|
15 | + function($class) { |
|
16 | 16 | |
17 | 17 | // project-specific namespace prefix |
18 | 18 | //$prefix = 'Foo\\Bar\\'; |