Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0854c12

Browse filesBrowse files
committed
minor symfony#19121 Php cs fixer (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- Php cs fixer | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 7cc3ca5 fixed CS fdef804 tweaked default CS fixer config
2 parents a0cdcb0 + 7cc3ca5 commit 0854c12
Copy full SHA for 0854c12

File tree

Expand file treeCollapse file tree

10 files changed

+19
-14
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+19
-14
lines changed

‎.php_cs

Copy file name to clipboardExpand all lines: .php_cs
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
return Symfony\CS\Config\Config::create()
44
->setUsingLinter(false)
55
->setUsingCache(true)
6+
->fixers(array(
7+
'long_array_syntax',
8+
'php_unit_construct',
9+
))
610
->finder(
711
Symfony\CS\Finder\DefaultFinder::create()
812
->in(__DIR__)
@@ -12,6 +16,7 @@ return Symfony\CS\Config\Config::create()
1216
'src/Symfony/Component/Routing/Tests/Fixtures/dumper',
1317
// fixture templates
1418
'src/Symfony/Component/Templating/Tests/Fixtures/templates',
19+
'src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
1520
// resource templates
1621
'src/Symfony/Bundle/FrameworkBundle/Resources/views/Form',
1722
))

‎src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function listBundles(OutputInterface $output)
3232
$rows = array();
3333

3434
$bundles = $this->getContainer()->get('kernel')->getBundles();
35-
usort($bundles, function($bundleA, $bundleB) {
35+
usort($bundles, function ($bundleA, $bundleB) {
3636
return strcmp($bundleA->getName(), $bundleB->getName());
3737
});
3838

‎src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ private function updateFactoryReference(array $replacements, $factory)
139139
$factory[0] = new Reference($replacements[$referenceId], $factory[0]->getInvalidBehavior());
140140
}
141141

142-
143142
return $factory;
144143
}
145144
}

‎src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testReverseTransform()
6868

6969
$this->assertSame($out, $this->transformer->reverseTransform($in));
7070
// values are expected to be valid choices and stay the same
71-
$inWithNull = array('0','1','2','3');
71+
$inWithNull = array('0', '1', '2', '3');
7272
$out[] = null;
7373

7474
$this->assertSame($out, $this->transformerWithNull->reverseTransform($inWithNull));

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,7 @@ private function getMergeStatement($sessionId, $data, $maxlifetime)
694694
$mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB);
695695
$mergeStmt->bindParam(7, $maxlifetime, \PDO::PARAM_INT);
696696
$mergeStmt->bindValue(8, time(), \PDO::PARAM_INT);
697-
}
698-
else {
697+
} else {
699698
$mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR);
700699
$mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB);
701700
$mergeStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT);

‎src/Symfony/Component/Process/Tests/ProcessTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Tests/ProcessTest.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,8 @@ public function pipesCodeProvider()
11801180
/**
11811181
* @dataProvider provideVariousIncrementals
11821182
*/
1183-
public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method) {
1183+
public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method)
1184+
{
11841185
$process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\''.$stream.'\', $n, 1); $n++; usleep(1000); }'), null, null, null, null);
11851186
$process->start();
11861187
$result = '';
@@ -1195,7 +1196,8 @@ public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method)
11951196
$process->stop();
11961197
}
11971198

1198-
public function provideVariousIncrementals() {
1199+
public function provideVariousIncrementals()
1200+
{
11991201
return array(
12001202
array('php://stdout', 'getIncrementalOutput'),
12011203
array('php://stderr', 'getIncrementalErrorOutput'),

‎src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function supports($resource, $type = null)
6969
if (!is_string($resource)) {
7070
return false;
7171
}
72-
72+
7373
try {
7474
$path = $this->locator->locate($resource);
7575
} catch (\Exception $e) {

‎src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ public function testEncodeSerializerXmlRootNodeNameOption()
249249
$this->assertEquals($expected, $serializer->serialize($array, 'xml', $options));
250250
}
251251

252-
public function testEncodeTraversableWhenNormalizable() {
252+
public function testEncodeTraversableWhenNormalizable()
253+
{
253254
$this->encoder = new XmlEncoder();
254255
$serializer = new Serializer(array(new CustomNormalizer()), array('xml' => new XmlEncoder()));
255256
$this->encoder->setSerializer($serializer);
@@ -261,7 +262,6 @@ public function testEncodeTraversableWhenNormalizable() {
261262
XML;
262263

263264
$this->assertEquals($expected, $serializer->serialize(new NormalizableTraversableDummy(), 'xml'));
264-
265265
}
266266

267267
public function testDecode()

‎src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public static function setStaticObject($object)
654654

655655
protected function getPrivate()
656656
{
657-
throw new \RuntimeException('Dummy::getPrivate() should not be called');
657+
throw new \RuntimeException('Dummy::getPrivate() should not be called');
658658
}
659659
}
660660

‎src/Symfony/Component/Translation/Tests/TranslatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/TranslatorTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ public function testFallbackCatalogueResources()
285285

286286
$resources = $translator->getCatalogue('en')->getResources();
287287
$this->assertCount(1, $resources);
288-
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
288+
$this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
289289

290290
$resources = $translator->getCatalogue('en_GB')->getResources();
291291
$this->assertCount(2, $resources);
292-
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources);
293-
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
292+
$this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources);
293+
$this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
294294
}
295295

296296
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.