Upgrade framework
This commit is contained in:
@@ -15,20 +15,17 @@ namespace Symfony\Component\HttpKernel\CacheClearer;
|
||||
* ChainCacheClearer.
|
||||
*
|
||||
* @author Dustin Dobervich <ddobervich@gmail.com>
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class ChainCacheClearer implements CacheClearerInterface
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $clearers;
|
||||
private iterable $clearers;
|
||||
|
||||
/**
|
||||
* Constructs a new instance of ChainCacheClearer.
|
||||
*
|
||||
* @param array $clearers The initial clearers
|
||||
* @param iterable<mixed, CacheClearerInterface> $clearers
|
||||
*/
|
||||
public function __construct(array $clearers = array())
|
||||
public function __construct(iterable $clearers = [])
|
||||
{
|
||||
$this->clearers = $clearers;
|
||||
}
|
||||
@@ -36,20 +33,10 @@ class ChainCacheClearer implements CacheClearerInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function clear($cacheDir)
|
||||
public function clear(string $cacheDir)
|
||||
{
|
||||
foreach ($this->clearers as $clearer) {
|
||||
$clearer->clear($cacheDir);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a cache clearer to the aggregate.
|
||||
*
|
||||
* @param CacheClearerInterface $clearer
|
||||
*/
|
||||
public function add(CacheClearerInterface $clearer)
|
||||
{
|
||||
$this->clearers[] = $clearer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user