@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException |
48 | 48 | * MUST be thrown. |
49 | 49 | * |
50 | - * @return CacheItemInterface |
|
50 | + * @return \Psr\Cache\CacheItemInterface |
|
51 | 51 | * The corresponding Cache Item. |
52 | 52 | */ |
53 | 53 | public function getItem($key) |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | /** |
255 | 255 | * Persists a cache item immediately. |
256 | 256 | * |
257 | - * @param CacheItemInterface $item |
|
257 | + * @param \Psr\Cache\CacheItemInterface $item |
|
258 | 258 | * The cache item to save. |
259 | 259 | * |
260 | 260 | * @return bool |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | /** |
277 | 277 | * Sets a cache item to be persisted later. |
278 | 278 | * |
279 | - * @param CacheItemInterface $item |
|
279 | + * @param \Psr\Cache\CacheItemInterface $item |
|
280 | 280 | * The cache item to save. |
281 | 281 | * |
282 | 282 | * @return bool |
@@ -228,7 +228,6 @@ |
||
228 | 228 | * |
229 | 229 | * @param array $keys |
230 | 230 | * An array of keys that should be removed from the pool. |
231 | - |
|
232 | 231 | * @throws InvalidArgumentException |
233 | 232 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException |
234 | 233 | * MUST be thrown. |
@@ -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 |
@@ -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\\'; |
@@ -90,7 +90,6 @@ |
||
90 | 90 | * |
91 | 91 | * @param array $keys |
92 | 92 | * An array of keys that should be removed from the pool. |
93 | - |
|
94 | 93 | * @throws InvalidArgumentException |
95 | 94 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException |
96 | 95 | * MUST be thrown. |
@@ -152,10 +152,10 @@ |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
155 | - * Sets the timezone that should be used for the expiration time |
|
156 | - * |
|
157 | - * @param DateTimeZone $timeZone The timezone used for the expiration time |
|
158 | - */ |
|
155 | + * Sets the timezone that should be used for the expiration time |
|
156 | + * |
|
157 | + * @param DateTimeZone $timeZone The timezone used for the expiration time |
|
158 | + */ |
|
159 | 159 | public function setTimeZone($timeZone) |
160 | 160 | { |
161 | 161 | $this->timeZone = $timeZone; |
@@ -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 |