package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -20,7 +20,7 @@ namespace Symfony\Component\HttpKernel\CacheClearer;
*/
class ChainCacheClearer implements CacheClearerInterface
{
private $clearers;
private iterable $clearers;
/**
* @param iterable<mixed, CacheClearerInterface> $clearers
@@ -30,9 +30,6 @@ class ChainCacheClearer implements CacheClearerInterface
$this->clearers = $clearers;
}
/**
* {@inheritdoc}
*/
public function clear(string $cacheDir)
{
foreach ($this->clearers as $clearer) {

View File

@@ -18,7 +18,7 @@ use Psr\Cache\CacheItemPoolInterface;
*/
class Psr6CacheClearer implements CacheClearerInterface
{
private $pools = [];
private array $pools = [];
/**
* @param array<string, CacheItemPoolInterface> $pools
@@ -28,20 +28,15 @@ class Psr6CacheClearer implements CacheClearerInterface
$this->pools = $pools;
}
/**
* @return bool
*/
public function hasPool(string $name)
public function hasPool(string $name): bool
{
return isset($this->pools[$name]);
}
/**
* @return CacheItemPoolInterface
*
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function getPool(string $name)
public function getPool(string $name): CacheItemPoolInterface
{
if (!$this->hasPool($name)) {
throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name));
@@ -51,11 +46,9 @@ class Psr6CacheClearer implements CacheClearerInterface
}
/**
* @return bool
*
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function clearPool(string $name)
public function clearPool(string $name): bool
{
if (!isset($this->pools[$name])) {
throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name));
@@ -64,9 +57,6 @@ class Psr6CacheClearer implements CacheClearerInterface
return $this->pools[$name]->clear();
}
/**
* {@inheritdoc}
*/
public function clear(string $cacheDir)
{
foreach ($this->pools as $pool) {