Skip to content

Commit 5f9aaa7

Browse files
[Cache] fix return type declarations
1 parent 5072cfc commit 5f9aaa7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Symfony/Component/Cache/DoctrineProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ protected function doDelete($id)
9090
*/
9191
protected function doFlush()
9292
{
93-
$this->pool->clear();
93+
return $this->pool->clear();
9494
}
9595

9696
/**
9797
* {@inheritdoc}
9898
*/
9999
protected function doGetStats()
100100
{
101+
return null;
101102
}
102103
}

src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function testLongKeyVersioning()
4040
->setConstructorArgs([str_repeat('-', 26)])
4141
->getMock();
4242

43+
$cache
44+
->method('doFetch')
45+
->willReturn(['2:']);
46+
4347
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
4448

4549
$reflectionMethod = $reflectionClass->getMethod('getId');
@@ -56,7 +60,7 @@ public function testLongKeyVersioning()
5660
$reflectionProperty->setValue($cache, true);
5761

5862
// Versioning enabled
59-
$this->assertEquals('--------------------------:1:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
63+
$this->assertEquals('--------------------------:2:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
6064
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])));
6165
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)])));
6266
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));

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