Skip to content

Commit 222c801

Browse files
committed
coding style
1 parent d7b0fb9 commit 222c801

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/Bridges.Latte/CacheMacro.createCache.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require __DIR__ . '/../bootstrap.php';
1717
test(function () {
1818
$parents = [];
1919
$dp = [Cache::TAGS => ['rum', 'cola']];
20-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
20+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
2121
Assert::type(Nette\Caching\OutputHelper::class, $outputHelper);
2222
CacheMacro::endCache($parents, $dp);
2323
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
@@ -29,7 +29,7 @@ test(function () {
2929
$dpFallback = function () use ($dp) {
3030
return $dp;
3131
};
32-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
32+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
3333
CacheMacro::endCache($parents, ['dependencies' => $dpFallback]);
3434
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
3535
});
@@ -43,7 +43,7 @@ test(function () {
4343
$dpFallback = function () use ($dp) {
4444
return $dp;
4545
};
46-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
46+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
4747
CacheMacro::endCache($parents, ['dependencies' => $dpFallback]);
4848
Assert::same($dp, $outputHelper->dependencies);
4949
});

tests/Caching/Cache.bulkLoad.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test(function () {
6060

6161
test(function () {
6262
Assert::exception(function () {
63-
$cache = new Cache(new BulkReadTestStorage());
63+
$cache = new Cache(new BulkReadTestStorage);
6464
$cache->bulkLoad([[1]]);
6565
}, Nette\InvalidArgumentException::class, 'Only scalar keys are allowed in bulkLoad()');
6666
});

tests/Caching/Cache.load.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/Cache.php';
1616

1717

1818
// load twice with fallback
19-
$storage = new TestStorage();
19+
$storage = new TestStorage;
2020
$cache = new Cache($storage, 'ns');
2121

2222
$value = $cache->load('key', function () {
@@ -32,7 +32,7 @@ Assert::equal('value', $data['data']);
3232

3333
// load twice with closure fallback, pass dependencies
3434
$dependencies = [Cache::TAGS => ['tag']];
35-
$storage = new TestStorage();
35+
$storage = new TestStorage;
3636
$cache = new Cache($storage, 'ns');
3737

3838
$value = $cache->load('key', function (&$deps) use ($dependencies) {

tests/Caching/Cache.save.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/Cache.php';
1616

1717

1818
// save value with dependencies
19-
$storage = new testStorage();
19+
$storage = new testStorage;
2020
$cache = new Cache($storage, 'ns');
2121
$dependencies = [Cache::TAGS => ['tag']];
2222

@@ -28,7 +28,7 @@ Assert::equal($dependencies, $res['dependencies']);
2828

2929

3030
// save callback return value
31-
$storage = new testStorage();
31+
$storage = new testStorage;
3232
$cache = new Cache($storage, 'ns');
3333

3434
$cache->save('key', function () {
@@ -41,7 +41,7 @@ Assert::equal([], $res['dependencies']);
4141

4242

4343
// save callback return value with dependencies
44-
$storage = new testStorage();
44+
$storage = new testStorage;
4545
$cache = new Cache($storage, 'ns');
4646
$dependencies = [Cache::TAGS => ['tag']];
4747

@@ -55,7 +55,7 @@ Assert::equal($dependencies, $res['dependencies']);
5555

5656

5757
// do not save already expired data
58-
$storage = new testStorage();
58+
$storage = new testStorage;
5959
$cache = new Cache($storage, 'ns');
6060
$dependencies = [Cache::EXPIRATION => new DateTime];
6161

0 commit comments

Comments
 (0)