Skip to content

Commit c1deafd

Browse files
committed
coding style
1 parent 5f17fed commit c1deafd

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
@@ -15,7 +15,7 @@ require __DIR__ . '/../bootstrap.php';
1515
test(function () {
1616
$parents = [];
1717
$dp = [Cache::TAGS => ['rum', 'cola']];
18-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
18+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
1919
Assert::type(Nette\Caching\OutputHelper::class, $outputHelper);
2020
CacheMacro::endCache($parents, $dp);
2121
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
@@ -27,7 +27,7 @@ test(function () {
2727
$dpFallback = function () use ($dp) {
2828
return $dp;
2929
};
30-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
30+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
3131
CacheMacro::endCache($parents, ['dependencies' => $dpFallback]);
3232
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
3333
});
@@ -41,7 +41,7 @@ test(function () {
4141
$dpFallback = function () use ($dp) {
4242
return $dp;
4343
};
44-
$outputHelper = CacheMacro::createCache(new DevNullStorage(), 'test', $parents);
44+
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
4545
CacheMacro::endCache($parents, ['dependencies' => $dpFallback]);
4646
Assert::same($dp, $outputHelper->dependencies);
4747
});

tests/Caching/Cache.bulkLoad.phpt

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

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

tests/Caching/Cache.load.phpt

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

1515

1616
// load twice with fallback
17-
$storage = new TestStorage();
17+
$storage = new TestStorage;
1818
$cache = new Cache($storage, 'ns');
1919

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

3131
// load twice with closure fallback, pass dependencies
3232
$dependencies = [Cache::TAGS => ['tag']];
33-
$storage = new TestStorage();
33+
$storage = new TestStorage;
3434
$cache = new Cache($storage, 'ns');
3535

3636
$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
@@ -14,7 +14,7 @@ require __DIR__ . '/Cache.php';
1414

1515

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

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

2727

2828
// save callback return value
29-
$storage = new testStorage();
29+
$storage = new testStorage;
3030
$cache = new Cache($storage, 'ns');
3131

3232
$cache->save('key', function () {
@@ -39,7 +39,7 @@ Assert::equal([], $res['dependencies']);
3939

4040

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

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

5454

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

0 commit comments

Comments
 (0)