Skip to content

Commit b0b475e

Browse files
committed
coding style: removed space after reference &
1 parent f6ccca8 commit b0b475e

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/Bridges/CacheLatte/CacheMacro.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function initRuntime(Latte\Runtime\Template $template)
9898
* @param array
9999
* @return Nette\Caching\OutputHelper
100100
*/
101-
public static function createCache(Nette\Caching\IStorage $cacheStorage, $key, & $parents, array $args = NULL)
101+
public static function createCache(Nette\Caching\IStorage $cacheStorage, $key, &$parents, array $args = NULL)
102102
{
103103
if ($args) {
104104
if (array_key_exists('if', $args) && !$args['if']) {

src/Caching/Cache.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public function load($key, $fallback = NULL)
8989
{
9090
$data = $this->storage->read($this->generateKey($key));
9191
if ($data === NULL && $fallback) {
92-
return $this->save($key, function (& $dependencies) use ($fallback) {
93-
return call_user_func_array($fallback, [& $dependencies]);
92+
return $this->save($key, function (&$dependencies) use ($fallback) {
93+
return call_user_func_array($fallback, [&$dependencies]);
9494
});
9595
}
9696
return $data;
@@ -119,8 +119,8 @@ public function bulkLoad(array $keys, $fallback = NULL)
119119
if ($fallback !== NULL) {
120120
foreach ($result as $key => $value) {
121121
if ($value === NULL) {
122-
$result[$key] = $this->save($key, function (& $dependencies) use ($key, $fallback) {
123-
return call_user_func_array($fallback, [$key, & $dependencies]);
122+
$result[$key] = $this->save($key, function (&$dependencies) use ($key, $fallback) {
123+
return call_user_func_array($fallback, [$key, &$dependencies]);
124124
});
125125
}
126126
}
@@ -135,8 +135,8 @@ public function bulkLoad(array $keys, $fallback = NULL)
135135
if (isset($cacheData[$storageKey])) {
136136
$result[$key] = $cacheData[$storageKey];
137137
} elseif ($fallback) {
138-
$result[$key] = $this->save($key, function (& $dependencies) use ($key, $fallback) {
139-
return call_user_func_array($fallback, [$key, & $dependencies]);
138+
$result[$key] = $this->save($key, function (&$dependencies) use ($key, $fallback) {
139+
return call_user_func_array($fallback, [$key, &$dependencies]);
140140
});
141141
} else {
142142
$result[$key] = NULL;
@@ -173,7 +173,7 @@ public function save($key, $data, array $dependencies = NULL)
173173
}
174174
$this->storage->lock($key);
175175
try {
176-
$data = call_user_func_array($data, [& $dependencies]);
176+
$data = call_user_func_array($data, [&$dependencies]);
177177
} catch (\Throwable $e) {
178178
$this->storage->remove($key);
179179
throw $e;

tests/Caching/Cache.bulkLoad.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test(function () {
4747
$storage = new BulkReadTestStorage;
4848
$cache = new Cache($storage, 'ns');
4949
$dependencies = [Cache::TAGS => ['tag']];
50-
$cache->bulkLoad([1], function ($key, & $deps) use ($dependencies) {
50+
$cache->bulkLoad([1], function ($key, &$deps) use ($dependencies) {
5151
$deps = $dependencies;
5252
return $key;
5353
});

tests/Caching/Cache.load.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $dependencies = [Cache::TAGS => ['tag']];
3333
$storage = new TestStorage();
3434
$cache = new Cache($storage, 'ns');
3535

36-
$value = $cache->load('key', function (& $deps) use ($dependencies) {
36+
$value = $cache->load('key', function (&$deps) use ($dependencies) {
3737
$deps = $dependencies;
3838
return 'value';
3939
});
@@ -47,7 +47,7 @@ Assert::equal($dependencies, $data['dependencies']);
4747

4848

4949
// load twice with fallback, pass dependencies
50-
function fallback(& $deps) {
50+
function fallback(&$deps) {
5151
global $dependencies;
5252
$deps = $dependencies;
5353
return 'value';

tests/Storages/FileStorage.loadOrSave.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Assert::null($cache->load($key));
2222

2323

2424
// Writing cache using Closure...
25-
$res = $cache->load($key, function (& $dp) use ($value) {
25+
$res = $cache->load($key, function (&$dp) use ($value) {
2626
$dp = [
2727
Cache::EXPIRATION => time() + 2,
2828
];

0 commit comments

Comments
 (0)