Skip to content

Commit 816de70

Browse files
committed
Code style
1 parent 50063c8 commit 816de70

File tree

6 files changed

+43
-13
lines changed

6 files changed

+43
-13
lines changed

src/DependencyInjection/CacheAdapterExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
namespace Cache\AdapterBundle\DependencyInjection;
1313

1414
use Cache\AdapterBundle\DummyAdapter;
15-
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1615
use Symfony\Component\Config\FileLocator;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
18-
use Symfony\Component\DependencyInjection\Definition;
1917
use Symfony\Component\DependencyInjection\Loader;
2018
use Symfony\Component\DependencyInjection\Reference;
2119
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

src/DummyAdapter.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of php-cache\adapter-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
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+
312
namespace Cache\AdapterBundle;
413

514
/**
@@ -9,4 +18,4 @@
918
*/
1019
class DummyAdapter
1120
{
12-
}
21+
}
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<?php
22

3+
/*
4+
* This file is part of php-cache\adapter-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
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+
312
namespace Cache\AdapterBundle\Factory;
413

514
interface AdapterFactoryInterface
615
{
7-
public function createAdapter(array $options = array());
8-
}
16+
public function createAdapter(array $options = []);
17+
}

src/Factory/DoctrineRedisFactory.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
<?php
22

3+
/*
4+
* This file is part of php-cache\adapter-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
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+
312
namespace Cache\AdapterBundle\Factory;
413

514
use Cache\Adapter\Doctrine\DoctrineCachePool;
6-
use Cache\Adapter\Redis\RedisCachePool;
715
use Doctrine\Common\Cache\RedisCache;
8-
use Predis\Client;
916

1017
class 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+
}

src/Factory/RedisFactory.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
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 <[email protected]>, Tobias Nyholm <[email protected]>
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

614
use Cache\Adapter\Redis\RedisCachePool;
715
use Predis\Client;
816

917
class 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+
}

tests/DependencyInjection/DoctrineCacheExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)