Skip to content

Commit b0ba74d

Browse files
committed
minor #12872 [2.6] CS Fixes And Removed An Unused Import (GrahamCampbell)
This PR was squashed before being merged into the 2.6 branch (closes #12872). Discussion ---------- [2.6] CS Fixes And Removed An Unused Import | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A ##### This pull request fixes some cs issues in symfony 2.6. This is the sequel to #12856. Commits ------- 2f10a0a [2.6] CS Fixes And Removed An Unused Import
2 parents c4a8041 + 2f10a0a commit b0ba74d

File tree

35 files changed

+116
-112
lines changed

35 files changed

+116
-112
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ protected function getDriver(ContainerBuilder $container)
196196
* @return string a service definition name
197197
*
198198
* @throws ParameterNotFoundException if none of the managerParameters has a
199-
* non-empty value.
199+
* non-empty value.
200200
*/
201201
private function getConfigurationServiceName(ContainerBuilder $container)
202202
{

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

+34-34
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ protected function setUp()
5454
public function testFixManagersAutoMappingsWithTwoAutomappings()
5555
{
5656
$emConfigs = array(
57-
'em1'=> array(
58-
'auto_mapping' => true
57+
'em1' => array(
58+
'auto_mapping' => true,
5959
),
60-
'em2'=> array(
61-
'auto_mapping' => true
60+
'em2' => array(
61+
'auto_mapping' => true,
6262
),
6363
);
6464

6565
$bundles = array(
66-
'FristBundle'=> 'My\FristBundle',
67-
'SecondBundle'=> 'My\SecondBundle',
66+
'FristBundle' => 'My\FristBundle',
67+
'SecondBundle' => 'My\SecondBundle',
6868
);
6969

7070
$reflection = new \ReflectionClass(get_class($this->extension));
@@ -79,65 +79,65 @@ public function getAutomappingData()
7979
return array(
8080
array(
8181
array( // no auto mapping on em1
82-
'auto_mapping' => false
82+
'auto_mapping' => false,
8383
),
8484
array( // no auto mapping on em2
85-
'auto_mapping' => false
85+
'auto_mapping' => false,
8686
),
8787
array(),
88-
array()
88+
array(),
8989
),
9090
array(
9191
array( // no auto mapping on em1
92-
'auto_mapping' => false
92+
'auto_mapping' => false,
9393
),
9494
array( // auto mapping enabled on em2
95-
'auto_mapping' => true
95+
'auto_mapping' => true,
9696
),
9797
array(),
9898
array(
9999
'mappings' => array(
100100
'FristBundle' => array(
101101
'mapping' => true,
102-
'is_bundle' => true
102+
'is_bundle' => true,
103103
),
104104
'SecondBundle' => array(
105105
'mapping' => true,
106-
'is_bundle' => true
107-
)
108-
)
109-
)
106+
'is_bundle' => true,
107+
),
108+
),
109+
),
110110
),
111111
array(
112112
array( // no auto mapping on em1, but it defines SecondBundle as own
113113
'auto_mapping' => false,
114114
'mappings' => array(
115115
'SecondBundle' => array(
116116
'mapping' => true,
117-
'is_bundle' => true
118-
)
119-
)
117+
'is_bundle' => true,
118+
),
119+
),
120120
),
121121
array( // auto mapping enabled on em2
122-
'auto_mapping' => true
122+
'auto_mapping' => true,
123123
),
124124
array(
125125
'mappings' => array(
126126
'SecondBundle' => array(
127127
'mapping' => true,
128-
'is_bundle' => true
129-
)
130-
)
128+
'is_bundle' => true,
129+
),
130+
),
131131
),
132132
array(
133133
'mappings' => array(
134134
'FristBundle' => array(
135135
'mapping' => true,
136-
'is_bundle' => true
137-
)
138-
)
139-
)
140-
)
136+
'is_bundle' => true,
137+
),
138+
),
139+
),
140+
),
141141
);
142142
}
143143

@@ -147,13 +147,13 @@ public function getAutomappingData()
147147
public function testFixManagersAutoMappings(array $originalEm1, array $originalEm2, array $expectedEm1, array $expectedEm2)
148148
{
149149
$emConfigs = array(
150-
'em1'=> $originalEm1,
151-
'em2'=> $originalEm2,
150+
'em1' => $originalEm1,
151+
'em2' => $originalEm2,
152152
);
153153

154154
$bundles = array(
155-
'FristBundle'=> 'My\FristBundle',
156-
'SecondBundle'=> 'My\SecondBundle',
155+
'FristBundle' => 'My\FristBundle',
156+
'SecondBundle' => 'My\SecondBundle',
157157
);
158158

159159
$reflection = new \ReflectionClass(get_class($this->extension));
@@ -163,10 +163,10 @@ public function testFixManagersAutoMappings(array $originalEm1, array $originalE
163163
$newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles);
164164

165165
$this->assertEquals($newEmConfigs["em1"], array_merge(array(
166-
'auto_mapping' => false
166+
'auto_mapping' => false,
167167
), $expectedEm1));
168168
$this->assertEquals($newEmConfigs["em2"], array_merge(array(
169-
'auto_mapping' => false
169+
'auto_mapping' => false,
170170
), $expectedEm2));
171171
}
172172

src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

-1
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,4 @@ private function hardCopy($originDir, $targetDir)
141141
// We use a custom iterator to ignore VCS files
142142
$filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));
143143
}
144-
145144
}

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@ abstract protected function describeContainerParameter($parameter, array $option
189189
* Common options are:
190190
* * name: name of listened event
191191
*
192-
* @param EventDispatcherInterface $eventDispatcher
193-
* @param array $options
192+
* @param EventDispatcherInterface $eventDispatcher
193+
* @param array $options
194194
*/
195195
abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array());
196196

197197
/**
198198
* Describes a callable.
199199
*
200-
* @param callable $callable
201-
* @param array $options
200+
* @param callable $callable
201+
* @param array $options
202202
*/
203203
abstract protected function describeCallable($callable, array $options = array());
204204

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private function getContainerAliasData(Alias $alias)
242242

243243
/**
244244
* @param EventDispatcherInterface $eventDispatcher
245-
* @param string|null $event
245+
* @param string|null $event
246246
*
247247
* @return array
248248
*/
@@ -270,7 +270,7 @@ private function getEventDispatcherListenersData(EventDispatcherInterface $event
270270

271271
/**
272272
* @param callable $callable
273-
* @param array $options
273+
* @param array $options
274274
*
275275
* @return array
276276
*/

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ private function getContainerParameterDocument($parameter, $options = array())
412412
}
413413

414414
/**
415-
* @param EventDispatcherInterface $eventDispatcher
416-
* @param string|null $event
415+
* @param EventDispatcherInterface $eventDispatcher
416+
* @param string|null $event
417417
*
418418
* @return \DOMDocument
419419
*/

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public function build($controller)
122122
* Attempts to find a bundle that is *similar* to the given bundle name
123123
*
124124
* @param string $nonExistentBundleName
125+
*
125126
* @return string
126127
*/
127128
private function findAlternative($nonExistentBundleName)

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php

-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
1313

1414
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
15-
1615
use Symfony\Component\DependencyInjection\DefinitionDecorator;
17-
1816
use Symfony\Component\DependencyInjection\ContainerBuilder;
1917
use Symfony\Component\DependencyInjection\Reference;
2018

src/Symfony/Component/Config/Exception/FileLoaderLoadException.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
4343
if (null === $sourceResource) {
4444
$message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource));
4545
} else {
46-
$message .= sprintf('(which is being imported from "%s")',$this->varToString($sourceResource));
46+
$message .= sprintf('(which is being imported from "%s")', $this->varToString($sourceResource));
4747
}
4848
$message .= '.';
4949

5050
// if there's no previous message, present it the default way
5151
} elseif (null === $sourceResource) {
5252
$message .= sprintf('Cannot load resource "%s".', $this->varToString($resource));
5353
} else {
54-
$message .= sprintf('Cannot import resource "%s" from "%s".',$this->varToString($resource),$this->varToString($sourceResource));
54+
$message .= sprintf('Cannot import resource "%s" from "%s".', $this->varToString($resource), $this->varToString($sourceResource));
5555
}
5656

5757
// Is the resource located inside a bundle?
5858
if ('@' === $resource[0]) {
5959
$parts = explode(DIRECTORY_SEPARATOR, $resource);
6060
$bundle = substr($parts[0], 1);
61-
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.',$bundle);
61+
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
6262
}
6363

6464
parent::__construct($message, $code, $previous);

src/Symfony/Component/Console/Helper/ProgressBar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public function setOverwrite($overwrite)
382382
/**
383383
* Sets the current progress.
384384
*
385-
* @param int $step The current progress
385+
* @param int $step The current progress
386386
*
387387
* @throws \LogicException
388388
*/

src/Symfony/Component/CssSelector/Node/Specificity.php

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function getValue()
8181
* 0 if they are equal, and 1 if the argument is lower
8282
*
8383
* @param Specificity $specificity
84+
*
8485
* @return int
8586
*/
8687
public function compareTo(Specificity $specificity)

src/Symfony/Component/Debug/ErrorHandler.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ private function reRegister($prev)
338338
/**
339339
* Handles errors by filtering then logging them according to the configured bit fields.
340340
*
341-
* @param int $type One of the E_* constants
341+
* @param int $type One of the E_* constants
342342
* @param string $file
343343
* @param int $line
344344
* @param array $context
@@ -584,7 +584,7 @@ protected function getFatalErrorHandlers()
584584
/**
585585
* Sets the level at which the conversion to Exception is done.
586586
*
587-
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
587+
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable)
588588
*
589589
* @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead.
590590
*/
@@ -597,7 +597,7 @@ public function setLevel($level)
597597
/**
598598
* Sets the display_errors flag value.
599599
*
600-
* @param int $displayErrors The display_errors flag value
600+
* @param int $displayErrors The display_errors flag value
601601
*
602602
* @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead.
603603
*/

src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
2222
protected function createEventDispatcher()
2323
{
2424
$container = new Container();
25+
2526
return new ContainerAwareEventDispatcher($container);
2627
}
2728

src/Symfony/Component/ExpressionLanguage/ExpressionFunction.php

+18-18
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,25 @@ class ExpressionFunction
4141
* @param callable $compiler A callable able to compile the function
4242
* @param callable $evaluator A callable able to evaluate the function
4343
*/
44-
public function __construct($name, $compiler, $evaluator)
45-
{
46-
$this->name = $name;
47-
$this->compiler = $compiler;
48-
$this->evaluator = $evaluator;
49-
}
44+
public function __construct($name, $compiler, $evaluator)
45+
{
46+
$this->name = $name;
47+
$this->compiler = $compiler;
48+
$this->evaluator = $evaluator;
49+
}
5050

51-
public function getName()
52-
{
53-
return $this->name;
54-
}
51+
public function getName()
52+
{
53+
return $this->name;
54+
}
5555

56-
public function getCompiler()
57-
{
58-
return $this->compiler;
59-
}
56+
public function getCompiler()
57+
{
58+
return $this->compiler;
59+
}
6060

61-
public function getEvaluator()
62-
{
63-
return $this->evaluator;
64-
}
61+
public function getEvaluator()
62+
{
63+
return $this->evaluator;
64+
}
6565
}

src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ExpressionLanguage
3232
protected $functions = array();
3333

3434
/**
35-
* @param ParserCacheInterface $cache
35+
* @param ParserCacheInterface $cache
3636
* @param ExpressionFunctionProviderInterface[] $providers
3737
*/
3838
public function __construct(ParserCacheInterface $cache = null, array $providers = array())

src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testConstantFunction()
5757

5858
public function testProviders()
5959
{
60-
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider));
60+
$expressionLanguage = new ExpressionLanguage(null, array(new TestProvider()));
6161
$this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")'));
6262
$this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")'));
6363
}

src/Symfony/Component/Filesystem/Filesystem.php

+1
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ public function symlink($originDir, $targetDir, $copyOnWindows = false)
290290

291291
if ($onWindows && $copyOnWindows) {
292292
$this->mirror($originDir, $targetDir);
293+
293294
return;
294295
}
295296

src/Symfony/Component/HttpFoundation/ParameterBag.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ public function getInt($key, $default = 0, $deep = false)
256256
/**
257257
* Returns the parameter value converted to boolean.
258258
*
259-
* @param string $key The parameter key
260-
* @param mixed $default The default value if the parameter key does not exist
261-
* @param bool $deep If true, a path like foo[bar] will find deeper items
259+
* @param string $key The parameter key
260+
* @param mixed $default The default value if the parameter key does not exist
261+
* @param bool $deep If true, a path like foo[bar] will find deeper items
262262
*
263-
* @return bool The filtered value
263+
* @return bool The filtered value
264264
*/
265265
public function getBoolean($key, $default = false, $deep = false)
266266
{

0 commit comments

Comments
 (0)