[Cache] Normalize constructor arguments order

This commit is contained in:
Nicolas Grekas 2016-04-01 12:55:00 +02:00
parent a9dcce1f51
commit bc51fdeec3
5 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ class DoctrineAdapter extends AbstractAdapter
{
private $provider;
public function __construct(CacheProvider $provider, $defaultLifetime = 0, $namespace = '')
public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0)
{
parent::__construct('', $defaultLifetime);
$this->provider = $provider;

View File

@ -20,7 +20,7 @@ class FilesystemAdapter extends AbstractAdapter
{
private $directory;
public function __construct($directory, $defaultLifetime = 0, $namespace = '')
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
{
parent::__construct('', $defaultLifetime);

View File

@ -28,7 +28,7 @@ class ProxyAdapter implements AdapterInterface
private $hits = 0;
private $misses = 0;
public function __construct(CacheItemPoolInterface $pool, $defaultLifetime = 0, $namespace = '')
public function __construct(CacheItemPoolInterface $pool, $namespace = '', $defaultLifetime = 0)
{
$this->pool = $pool;
$this->namespace = $this->getId($namespace, true);

View File

@ -28,7 +28,7 @@ class ChainAdapterTest extends CachePoolTest
$this->skippedTests['testDeferredSaveWithoutCommit'] = 'Fails on HHVM';
}
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter(null)));
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter()));
}
/**

View File

@ -21,6 +21,6 @@ class NamespacedProxyAdapterTest extends ProxyAdapterTest
{
public function createCachePool()
{
return new ProxyAdapter(new ArrayAdapter(), 0, 'foo');
return new ProxyAdapter(new ArrayAdapter(), 'foo');
}
}