Skip to content

Commit 30a51b2

Browse files
committed
[4.3] Remove unused local variables
1 parent 08b664a commit 30a51b2

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Tests/Adapter/AdapterTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public function testRecursiveGet()
8787
$cache = $this->createCachePool(0, __FUNCTION__);
8888

8989
$v = $cache->get('k1', function () use (&$counter, $cache) {
90-
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; });
91-
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; });
90+
$cache->get('k2', function () use (&$counter) { return ++$counter; });
91+
$v = $cache->get('k2', function () use (&$counter) { return ++$counter; }); // ensure the callback is called once
9292

9393
return $v;
9494
});

Tests/Adapter/NullAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testGet()
3939
$adapter = $this->createCachePool();
4040

4141
$fetched = [];
42-
$item = $adapter->get('myKey', function ($item) use (&$fetched) { $fetched[] = $item; });
42+
$adapter->get('myKey', function ($item) use (&$fetched) { $fetched[] = $item; });
4343
$this->assertCount(1, $fetched);
4444
$item = $fetched[0];
4545
$this->assertFalse($item->isHit());

Tests/Adapter/PdoDbalAdapterTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public static function setUpBeforeClass(): void
3131
}
3232

3333
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
34-
35-
$pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
3634
}
3735

3836
public static function tearDownAfterClass(): void

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy