8000 PSR-2 fixes · MasterB/symfony@eda746b · GitHub
[go: up one dir, main page]

Skip to content

Commit eda746b

Browse files
PSR-2 fixes
1 parent b604b0a commit eda746b

File tree

44 files changed

+127
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+127
-128
lines changed

src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(FragmentHandler $handler)
3636
public function getFunctions()
3737
{
3838
return array(
39-
new \Twig_SimpleFunction('render',array($this, 'renderFragment'), array('is_safe' => array('html'))),
39+
new \Twig_SimpleFunction('render', array($this, 'renderFragment'), array('is_safe' => array('html'))),
4040
new \Twig_SimpleFunction('render_*', array($this, 'renderFragmentStrategy'), array('is_safe' => array('html'))),
4141
new \Twig_SimpleFunction('controller', array($this, 'controller')),
4242
);

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
226226
'memcached' => 'Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage',
227227
'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage',
228228
);
229-
list($class, ) = explode(':', $config['dsn'], 2);
229+
list($class,) = explode(':', $config['dsn'], 2);
230230
if (!isset($supported[$class])) {
231231
throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class));
232232
}
@@ -663,7 +663,7 @@ private function getValidatorYamlMappingFiles(ContainerBuilder $container)
663663
return $files;
664664
}
665665

666-
private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container,$loader)
666+
private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, $loader)
667667
{
668668
$loader->load('annotations.xml');
669669

src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public function testGetTemplates()
100100
->will($this->returnCallback(array($this, 'profileHasCollectorCallback')));
101101

102102
$result = $this->templateManager->getTemplates($profile);
103-
$this->assertArrayHasKey('foo',$result);
104-
$this->assertArrayNotHasKey('bar',$result);
105-
$this->assertArrayNotHasKey('baz',$result);
103+
$this->assertArrayHasKey('foo', $result);
104+
$this->assertArrayNotHasKey('bar', $result);
105+
$this->assertArrayNotHasKey('baz', $result);
106106
}
107107

108108
public function profilerHasCallback($panel)

src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ public function testCookieGetWithSubdomain()
202202
$cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/', '.example.com'));
203203
$cookieJar->set($cookie2 = new Cookie('foo1', 'bar', null, '/', 'test.example.com'));
204204

205-
$this->assertEquals($cookie1, $cookieJar->get('foo','/','foo.example.com'));
206-
$this->assertEquals($cookie1, $cookieJar->get('foo','/','example.com'));
207-
$this->assertEquals($cookie2, $cookieJar->get('foo1','/','test.example.com'));
205+
$this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'foo.example.com'));
206+
$this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'example.com'));
207+
$this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'test.example.com'));
208208
}
209209

210210
public function testCookieGetWithSubdirectory()
@@ -213,11 +213,11 @@ public function testCookieGetWithSubdirectory()
213213
$cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/test', '.example.com'));
214214
$cookieJar->set($cookie2 = new Cookie('foo1', 'bar1', null, '/', '.example.com'));
215215

216-
$this->assertNull($cookieJar->get('foo','/','.example.com'));
217-
$this->assertNull($cookieJar->get('foo','/bar','.example.com'));
218-
$this->assertEquals($cookie1, $cookieJar->get('foo','/test','example.com'));
219-
$this->assertEquals($cookie2, $cookieJar->get('foo1','/','example.com'));
220-
$this->assertEquals($cookie2, $cookieJar->get('foo1','/bar','example.com'));
216+
$this->assertNull($cookieJar->get('foo', '/', '.example.com'));
217+
$this->assertNull($cookieJar->get('foo', '/bar', '.example.com'));
218+
$this->assertEquals($cookie1, $cookieJar->get('foo', '/test', 'example.com'));
219+
$this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'example.com'));
220+
$this->assertEquals($cookie2, $cookieJar->get('foo1', '/bar', 'example.com'));
221221
}
222222

223223
public function testCookieWithWildcardDomain()

src/Symfony/Component/Config/Loader/FileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function import($resource, $type = null, $ignoreErrors = false, $sourceRe
9191
}
9292

9393
$resources = is_array($resource) ? $resource : array($resource);
94-
for ($i = 0; $i < $resourcesCount = count($resources); $i++ ) {
94+
for ($i = 0; $i < $resourcesCount = count($resources); $i++) {
9595
if (isset(self::$loading[$resources[$i]])) {
9696
if ($i == $resourcesCount-1) {
9797
throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));

src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ public function getZeroNamedNodeExamplesData()
116116
'string_key' => 'just value',
117117
),
118118
array(
119-
0 => array (
119+
0 => array(
120120
'name' => 'something',
121121
),
122-
5 => array (
122+
5 => array(
123123
0 => 'this won\'t work too',
124124
'new_key' => 'some other value',
125125
),

src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ public function testIfTrueExpression()
3333
$this->assertFinalizedValueIs('new_value', $test, array('key' => true));
3434

3535
$test = $this->getTestBuilder()
36-
->ifTrue( function ($v) { return true; })
36+
->ifTrue(function ($v) { return true; })
3737
->then($this->returnClosure('new_value'))
3838
->end();
3939
$this->assertFinalizedValueIs('new_value', $test);
4040

4141
$test = $this->getTestBuilder()
42-
->ifTrue( function ($v) { return false; })
42+
->ifTrue(function ($v) { return false; })
4343
->then($this->returnClosure('new_value'))
4444
->end();
45-
$this->assertFinalizedValueIs('value',$test);
45+
$this->assertFinalizedValueIs('value', $test);
4646
}
4747

4848
public function testIfStringExpression()

src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function describeApplication(Application $application, array $options
117117

118118
$blocks[] = implode("\n", array_map(function ($commandName) {
119119
return '* '.$commandName;
120-
} , $namespace['commands']));
120+
}, $namespace['commands']));
121121
}
122122

123123
foreach ($description->getCommands() as $command) {

src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ public function testPrevious(\Exception $exception, $statusCode)
126126

127127
$flattened->setPrevious($flattened2);
128128

129-
$this->assertSame($flattened2,$flattened->getPrevious());
129+
$this->assertSame($flattened2, $flattened->getPrevious());
130130

131-
$this->assertSame(array($flattened2),$flattened->getAllPrevious());
131+
$this->assertSame(array($flattened2), $flattened->getAllPrevious());
132132
}
133133

134134
/**
@@ -162,7 +162,7 @@ public function testToArray(\Exception $exception, $statusCode)
162162
'message' => 'test',
163163
'class' => 'Exception',
164164
'trace' => array(array(
165-
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', 'file' => 'foo.php', 'line' => 123,
165+
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123,
166166
'args' => array(),
167167
)),
168168
),
@@ -214,12 +214,12 @@ public function testSetTraceIncompleteClass()
214214
'class' => 'Exception',
215215
'trace' => array(
216216
array(
217-
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '',
217+
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '',
218218
'file' => 'foo.php', 'line' => 123,
219219
'args' => array(),
220220
),
221221
array(
222-
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test',
222+
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => 'test',
223223
'file' => __FILE__, 'line' => 123,
224224
'args' => array(
225225
array(

src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public function testSetLazyOnServiceHasParent()
147147
{
148148
$container = new ContainerBuilder();
149149

150-
$container->register('parent','stdClass');
150+
$container->register('parent', 'stdClass');
151151

152-
$container->setDefinition('child1',new DefinitionDecorator('parent'))
152+
$container->setDefinition('child1', new DefinitionDecorator('parent'))
153153
->setLazy(true)
154154
;
155155

@@ -162,11 +162,11 @@ public function testSetLazyOnServiceIsParent()
162162
{
163163
$container = new ContainerBuilder();
164164

165-
$container->register('parent','stdClass')
165+
$container->register('parent', 'stdClass')
166166
->setLazy(true)
167167
;
168168

169-
$container->setDefinition('child1',new DefinitionDecorator('parent'));
169+
$container->setDefinition('child1', new DefinitionDecorator('parent'));
170 4545 170

171171
$this->process($container);
172172

0 commit comments

Comments
 (0)
0