diff --git a/src/Pattern/CallbackCache.php b/src/Pattern/CallbackCache.php index c2c51418..2160cfe4 100644 --- a/src/Pattern/CallbackCache.php +++ b/src/Pattern/CallbackCache.php @@ -48,7 +48,7 @@ public function call($callback, array $args = []) $cacheOutput = $options->getCacheOutput(); if ($cacheOutput) { ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); } // TODO: do not cache on errors using [set|restore]_error_handler diff --git a/src/Pattern/CaptureCache.php b/src/Pattern/CaptureCache.php index f4b275e1..add05c48 100644 --- a/src/Pattern/CaptureCache.php +++ b/src/Pattern/CaptureCache.php @@ -48,7 +48,7 @@ public function start($pageId = null) return false; }); - ob_implicit_flush(0); + ob_implicit_flush(false); } /** diff --git a/src/Pattern/OutputCache.php b/src/Pattern/OutputCache.php index 8f69671d..68b98111 100644 --- a/src/Pattern/OutputCache.php +++ b/src/Pattern/OutputCache.php @@ -41,7 +41,7 @@ public function start($key) } ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); $this->keyStack[] = $key; return false; } diff --git a/src/Psr/CacheItemPool/CacheItem.php b/src/Psr/CacheItemPool/CacheItem.php index 65f5cd0f..9992151e 100644 --- a/src/Psr/CacheItemPool/CacheItem.php +++ b/src/Psr/CacheItemPool/CacheItem.php @@ -145,7 +145,7 @@ public function expiresAfter($time): static $time = $interval; } - /** @psalm-suppress RedundantConditionGivenDocblockType Until we do have native type-hints we should keep verifying this. */ + /** @psalm-suppress RedundantCondition Until we do have native type-hints we should keep verifying this. */ if ($time instanceof DateInterval) { $now = $this->clock->now(); return $this->expiresAt($now->add($time)); diff --git a/test/Pattern/CallbackCacheTest.php b/test/Pattern/CallbackCacheTest.php index 56b2d9bf..b7fe6852 100644 --- a/test/Pattern/CallbackCacheTest.php +++ b/test/Pattern/CallbackCacheTest.php @@ -117,7 +117,7 @@ protected function executeCallbackAndMakeAssertions($callback, array $args): voi $firstCounter = TestCallbackCache::$fooCounter + 1; ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); $return = $this->pattern->call($callback, $args); $data = ob_get_clean(); @@ -126,7 +126,7 @@ protected function executeCallbackAndMakeAssertions($callback, array $args): voi // second call - cached ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); $return = $this->pattern->call($callback, $args); $data = ob_get_clean(); diff --git a/test/Pattern/ObjectCacheTest.php b/test/Pattern/ObjectCacheTest.php index 179291c3..ce90be98 100644 --- a/test/Pattern/ObjectCacheTest.php +++ b/test/Pattern/ObjectCacheTest.php @@ -130,7 +130,7 @@ protected function executeMethodAndMakeAssertions(string $method, array $args): $firstCounter = TestObjectCache::$fooCounter + 1; ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); $return = $callback(...$args); $data = ob_get_contents(); ob_end_clean(); @@ -140,7 +140,7 @@ protected function executeMethodAndMakeAssertions(string $method, array $args): // second call - cached ob_start(); - ob_implicit_flush(0); + ob_implicit_flush(false); $return = $callback(...$args); $data = ob_get_contents(); ob_end_clean(); diff --git a/test/Psr/CacheItemPool/CacheItemPoolDecoratorTest.php b/test/Psr/CacheItemPool/CacheItemPoolDecoratorTest.php index 0e9da74d..c73e08ea 100644 --- a/test/Psr/CacheItemPool/CacheItemPoolDecoratorTest.php +++ b/test/Psr/CacheItemPool/CacheItemPoolDecoratorTest.php @@ -222,7 +222,10 @@ public function testGetNonexistentItems(): void ->willReturn([]); $adapter = $this->getAdapter($storage); - $items = $adapter->getItems($keys); + /** + * @var array $items + */ + $items = $adapter->getItems($keys); self::assertEquals($keys, array_keys($items)); foreach ($keys as $key) { self::assertEquals($key, $items[$key]->getKey()); @@ -268,6 +271,9 @@ public function testGetMixedItems(): void ->with($keys) ->willReturn(['bar' => 'value']); + /** + * @var array $items + */ $items = $this->getAdapter($storage)->getItems($keys); self::assertCount(2, $items); self::assertNull($items['foo']->get()); @@ -295,6 +301,9 @@ public function testGetItemsRuntimeExceptionIsMiss(): void ->with($keys) ->willThrowException(new Exception\RuntimeException()); + /** + * @var array $items + */ $items = $this->getAdapter($storage)->getItems($keys); self::assertCount(2, $items); foreach ($keys as $key) { @@ -338,6 +347,9 @@ public function testSaveItem(): void $item = $adapter->getItem('foo'); $item->set('bar'); self::assertTrue($adapter->save($item)); + /** + * @var array $saved + */ $saved = $adapter->getItems(['foo']); self::assertEquals('bar', $saved['foo']->get()); self::assertTrue($saved['foo']->isHit()); @@ -376,6 +388,9 @@ public function testSaveItemWithExpiration(): void $item->set('bar'); $item->expiresAfter(3600); self::assertTrue($adapter->save($item)); + /** + * @var array $saved + */ $saved = $adapter->getItems(['foo']); self::assertEquals('bar', $saved['foo']->get()); self::assertTrue($saved['foo']->isHit());