@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | |
3 | 3 | /* Example with Anax-MVC */ |
4 | 4 | |
5 | -require __DIR__.'/config_with_app.php'; |
|
5 | +require __DIR__ . '/config_with_app.php'; |
|
6 | 6 | |
7 | -$di->setShared("cache", function () { |
|
7 | +$di->setShared("cache", function() { |
|
8 | 8 | $cache = new \Anax\Cache\CCachePool(); |
9 | 9 | return $cache; |
10 | 10 | }); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $app->url->setUrlType(\Anax\Url\CUrl::URL_CLEAN); |
15 | 15 | |
16 | 16 | //root |
17 | -$app->router->add('cache', function () use ($app) { |
|
17 | +$app->router->add('cache', function() use ($app) { |
|
18 | 18 | // Start the session |
19 | 19 | $app->session(); |
20 | 20 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @return void |
13 | 13 | */ |
14 | 14 | spl_autoload_register( |
15 | - function ($class) { |
|
15 | + function($class) { |
|
16 | 16 | // project-specific namespace prefix |
17 | 17 | //$prefix = 'Foo\\Bar\\'; |
18 | 18 | $prefix = 'Anax\\'; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | // autoloader for 'Psr\' |
42 | 42 | spl_autoload_register( |
43 | - function ($class) { |
|
43 | + function($class) { |
|
44 | 44 | // project-specific namespace prefix |
45 | 45 | //$prefix = 'Foo\\Bar\\'; |
46 | 46 | $prefix = 'Psr\\'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->key = $key; |
46 | 46 | $this->value = $value; |
47 | 47 | |
48 | - $this->timeZone = is_null($timeZone) ? new \DateTimeZone('Europe/London') : $timeZone; |
|
48 | + $this->timeZone = is_null($timeZone) ? new \DateTimeZone('Europe/London') : $timeZone; |
|
49 | 49 | $this->defaultExpiration = '2999-12-12'; |
50 | 50 | |
51 | 51 | $this->expiration = is_null($expiration) ? new \DateTime($this->defaultExpiration, $this->timeZone) : $expiration; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function expiresAt($expiration) |
177 | 177 | { |
178 | - $this->expiration = is_null($expiration) ? : $expiration; |
|
178 | + $this->expiration = is_null($expiration) ?: $expiration; |
|
179 | 179 | return $this; |
180 | 180 | } |
181 | 181 |
@@ -135,7 +135,7 @@ |
||
135 | 135 | |
136 | 136 | // Iterates all keys and gets the associated item |
137 | 137 | $items = array(); |
138 | - for ($i=0; $i < count($keys); $i++) { |
|
138 | + for ($i = 0; $i < count($keys); $i++) { |
|
139 | 139 | $items[(string) $keys[$i]] = $this->getItem($keys[$i]); |
140 | 140 | } |
141 | 141 |