Skip to content

Commit 5931ffd

Browse files
committed
cs
1 parent d913e2d commit 5931ffd

File tree

4 files changed

+21
-26
lines changed

4 files changed

+21
-26
lines changed

src/Cache/Memcached.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
namespace Cache\DoctrineCacheBundle\Cache;
44

55
/**
6-
* Class Memcached
6+
* Class Memcached.
77
*
88
* @author Aaron Scherer <[email protected]>
99
*/
1010
class Memcached extends \Memcached
1111
{
1212
/**
13-
* {@inheritDoc}
13+
* {@inheritdoc}
1414
*/
1515
public function addServer($host, $port, $weight = 0)
1616
{

src/DependencyInjection/Configuration.php

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,25 @@
77
use Symfony\Component\Config\Definition\ConfigurationInterface;
88

99
/**
10-
* Class Configuration
10+
* Class Configuration.
1111
*
1212
* @author Aaron Scherer <[email protected]>
1313
*/
1414
class Configuration implements ConfigurationInterface
1515
{
16-
1716
/**
1817
* @var bool
1918
*/
2019
private $debug;
2120

2221
/**
23-
* Constructor
22+
* Constructor.
2423
*
2524
* @param Boolean $debug Whether to use the debug mode
2625
*/
2726
public function __construct($debug)
2827
{
29-
$this->debug = (Boolean)$debug;
28+
$this->debug = (Boolean) $debug;
3029
}
3130

3231
/**
@@ -37,7 +36,7 @@ public function __construct($debug)
3736
public function getConfigTreeBuilder()
3837
{
3938
$treeBuilder = new TreeBuilder();
40-
$rootNode = $treeBuilder->root('doctrine_cache');
39+
$rootNode = $treeBuilder->root('doctrine_cache');
4140

4241
$rootNode->children()
4342
->append($this->getClustersNode())
@@ -52,7 +51,7 @@ public function getConfigTreeBuilder()
5251
private function getClustersNode()
5352
{
5453
$treeBuilder = new TreeBuilder();
55-
$node = $treeBuilder->root('providers');
54+
$node = $treeBuilder->root('providers');
5655

5756
$node
5857
->requiresAtLeastOneElement()
@@ -68,11 +67,11 @@ private function getClustersNode()
6867
->end()
6968
->scalarNode('namespace')
7069
->defaultNull()
71-
->info("Namespace for doctrine keys.")
70+
->info('Namespace for doctrine keys.')
7271
->end()
7372
->integerNode('database')
7473
->defaultNull()
75-
->info("For Redis: Specify what database you want.")
74+
->info('For Redis: Specify what database you want.')
7675
->end()
7776
->scalarNode('persistent')
7877
->defaultNull()
@@ -88,21 +87,21 @@ function ($v) {
8887
}
8988
)
9089
->end()
91-
->info("For Redis and Memcached: Specify the persistent id if you want persistent connections.")
90+
->info('For Redis and Memcached: Specify the persistent id if you want persistent connections.')
9291
->end()
9392
->scalarNode('auth_password')
94-
->info("For Redis: Authorization info.")
93+
->info('For Redis: Authorization info.')
9594
->end()
9695
->scalarNode('directory')
97-
->info("For File System and PHP File: Directory to store cache.")
96+
->info('For File System and PHP File: Directory to store cache.')
9897
->defaultNull()
9998
->end()
10099
->scalarNode('extension')
101-
->info("For File System and PHP File: Extension to use.")
100+
->info('For File System and PHP File: Extension to use.')
102101
->defaultNull()
103102
->end()
104103
->arrayNode('options')
105-
->info("Options for Redis and Memcached.")
104+
->info('Options for Redis and Memcached.')
106105
->children()
107106
->append($this->getMemcachedOptions())
108107
->end()
@@ -121,11 +120,11 @@ function ($v) {
121120
return !is_null($v) && !is_numeric($v);
122121
}
123122
)
124-
->thenInvalid("Host port must be numeric")
123+
->thenInvalid('Host port must be numeric')
125124
->end()
126125
->end()
127126
->scalarNode('weight')
128-
->info("For Memcached: Weight for given host.")
127+
->info('For Memcached: Weight for given host.')
129128
->defaultNull()
130129
->validate()
131130
->ifTrue(
@@ -137,7 +136,7 @@ function ($v) {
137136
->end()
138137
->end()
139138
->scalarNode('timeout')
140-
->info("For Redis and Memcache: Timeout for the given host.")
139+
->info('For Redis and Memcache: Timeout for the given host.')
141140
->defaultNull()
142141
->validate()
143142
->ifTrue(
@@ -164,7 +163,7 @@ function ($v) {
164163
private function getMemcachedOptions()
165164
{
166165
$treeBuilder = new TreeBuilder();
167-
$node = $treeBuilder->root('memcached');
166+
$node = $treeBuilder->root('memcached');
168167

169168
if (class_exists('\Memcached')) {
170169
$node

src/DependencyInjection/DoctrineCacheExtension.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
99

1010
/**
11-
* Class AequasiCacheExtension
11+
* Class AequasiCacheExtension.
1212
*
1313
* @author Aaron Scherer <[email protected]>
1414
*/
1515
class DoctrineCacheExtension extends Extension
1616
{
1717
/**
18-
* Loads the configs for Cache and puts data into the container
18+
* Loads the configs for Cache and puts data into the container.
1919
*
2020
* @param array $configs Array of configs
2121
* @param ContainerBuilder $container Container Object
@@ -25,10 +25,9 @@ public function load(array $configs, ContainerBuilder $container)
2525
$configuration = new Configuration($container->getParameter('kernel.debug'));
2626
$config = $this->processConfiguration($configuration, $configs);
2727

28-
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
28+
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
2929
$loader->load('services.yml');
3030

3131
$container->setParameter('doctrine_cache.providers', $config['providers']);
32-
3332
}
3433
}

src/DoctrineCacheBundle.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
namespace Cache\DoctrineCacheBundle;
44

55
use Symfony\Component\HttpKernel\Bundle\Bundle;
6-
use Symfony\Component\DependencyInjection\ContainerBuilder;
76

87
/**
9-
*
10-
*
118
* @author Tobias Nyholm <[email protected]>
129
*/
1310
class DoctrineCacheBundle extends Bundle

0 commit comments

Comments
 (0)