File tree Expand file tree Collapse file tree
tests/DependencyInjection Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212namespace Cache \AdapterBundle \DependencyInjection ;
1313
1414use Cache \AdapterBundle \DummyAdapter ;
15- use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
1615use Symfony \Component \Config \FileLocator ;
1716use Symfony \Component \DependencyInjection \ContainerBuilder ;
18- use Symfony \Component \DependencyInjection \Definition ;
1917use Symfony \Component \DependencyInjection \Loader ;
2018use Symfony \Component \DependencyInjection \Reference ;
2119use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
Original file line number Diff line number Diff line change 11<?php
22
3+ /*
4+ * This file is part of php-cache\adapter-bundle package.
5+ *
6+ * (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+ *
8+ * This source file is subject to the MIT license that is bundled
9+ * with this source code in the file LICENSE.
10+ */
11+
312namespace Cache \AdapterBundle ;
413
514/**
918 */
1019class DummyAdapter
1120{
12- }
21+ }
Original file line number Diff line number Diff line change 11<?php
22
3+ /*
4+ * This file is part of php-cache\adapter-bundle package.
5+ *
6+ * (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+ *
8+ * This source file is subject to the MIT license that is bundled
9+ * with this source code in the file LICENSE.
10+ */
11+
312namespace Cache \AdapterBundle \Factory ;
413
514interface AdapterFactoryInterface
615{
7- public function createAdapter (array $ options = array () );
8- }
16+ public function createAdapter (array $ options = [] );
17+ }
Original file line number Diff line number Diff line change 11<?php
22
3+ /*
4+ * This file is part of php-cache\adapter-bundle package.
5+ *
6+ * (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+ *
8+ * This source file is subject to the MIT license that is bundled
9+ * with this source code in the file LICENSE.
10+ */
11+
312namespace Cache \AdapterBundle \Factory ;
413
514use Cache \Adapter \Doctrine \DoctrineCachePool ;
6- use Cache \Adapter \Redis \RedisCachePool ;
715use Doctrine \Common \Cache \RedisCache ;
8- use Predis \Client ;
916
1017class DoctrineRedisFactory implements AdapterFactoryInterface
1118{
12- public function createAdapter (array $ options = array () )
19+ public function createAdapter (array $ options = [] )
1320 {
1421 if (!class_exists ('Cache\Adapter\Doctrine\DoctrineCachePool ' )) {
1522 throw new \LogicException ('You must install the "cache/doctrine-adapter" package to use the "doctrine_redis" provider. ' );
@@ -26,4 +33,4 @@ public function createAdapter(array $options = array())
2633
2734 return new DoctrineCachePool ($ client );
2835 }
29- }
36+ }
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Cache \AdapterBundle \Factory ;
3+ /*
4+ * This file is part of php-cache\adapter-bundle package.
5+ *
6+ * (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+ *
8+ * This source file is subject to the MIT license that is bundled
9+ * with this source code in the file LICENSE.
10+ */
411
12+ namespace Cache \AdapterBundle \Factory ;
513
614use Cache \Adapter \Redis \RedisCachePool ;
715use Predis \Client ;
816
917class RedisFactory implements AdapterFactoryInterface
1018{
11- public function createAdapter (array $ options = array () )
19+ public function createAdapter (array $ options = [] )
1220 {
1321 if (!class_exists ('Cache\Adapter\Redis\RedisCachePool ' )) {
1422 throw new \LogicException ('You must install the "cache/redis-adapter" package to use the "redis" provider. ' );
@@ -20,4 +28,4 @@ public function createAdapter(array $options = array())
2028
2129 return new RedisCachePool ($ client );
2230 }
23- }
31+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ public function testThatProvidersExists()
2929 $ providers = ['foo ' => ['factory ' => 'cache.factory.redis ' ]];
3030 $ this ->load (['providers ' => $ providers ]);
3131
32-
3332 $ this ->assertContainerBuilderHasService ('cache.provider.foo ' , DummyAdapter::class);
3433 $ this ->assertContainerBuilderHasAlias ('cache ' , 'cache.provider.foo ' );
3534 }
You can’t perform that action at this time.
0 commit comments