Skip to content

Commit bf30b88

Browse files
committed
Merge branch '2.3' into 2.6
* 2.3: Fix small coding style [2.3] Static Code Analysis for Components [Form] fixed phpdoc CS: Convert double quotes to single quotes Fixed MongoODM entity loader. Improved loading behavior of entities and documents by reusing entity loader. [Validator] added Japanese translation for unmatched charset (id: 80) [DependencyInjection] Highest precedence for user parameters [Translation][MoFileLoader] fixed load empty translation. bumped Symfony version to 2.3.27 updated VERSION for 2.3.26 update CONTRIBUTORS for 2.3.26 updated CHANGELOG for 2.3.26 Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Bundle/TwigBundle/Command/LintCommand.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Debug/ExceptionHandler.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Translation/PluralizationRules.php src/Symfony/Component/Validator/Constraints/IssnValidator.php src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf src/Symfony/Component/Yaml/Tests/InlineTest.php
2 parents 31f3eb9 + eb11651 commit bf30b88

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

Encoder/XmlEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ private function buildXml(\DOMNode $parentNode, $data, $xmlRootNodeName = null)
368368
if (is_array($data) || $data instanceof \Traversable) {
369369
foreach ($data as $key => $data) {
370370
//Ah this is the magic @ attribute types.
371-
if (0 === strpos($key, "@") && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) {
371+
if (0 === strpos($key, '@') && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) {
372372
$parentNode->setAttribute($attributeName, $data);
373373
} elseif ($key === '#') {
374374
$append = $this->selectNodeType($parentNode, $data);
@@ -387,7 +387,7 @@ private function buildXml(\DOMNode $parentNode, $data, $xmlRootNodeName = null)
387387
$append = $this->appendNode($parentNode, $data, $key);
388388
}
389389
} elseif (is_numeric($key) || !$this->isElementNameValid($key)) {
390-
$append = $this->appendNode($parentNode, $data, "item", $key);
390+
$append = $this->appendNode($parentNode, $data, 'item', $key);
391391
} else {
392392
$append = $this->appendNode($parentNode, $data, $key);
393393
}

Tests/Encoder/JsonEncoderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp()
2626
public function testEncodeScalar()
2727
{
2828
$obj = new \stdClass();
29-
$obj->foo = "foo";
29+
$obj->foo = 'foo';
3030

3131
$expected = '{"foo":"foo"}';
3232

@@ -47,14 +47,14 @@ public function testOptions()
4747
$context = array('json_encode_options' => JSON_NUMERIC_CHECK);
4848

4949
$arr = array();
50-
$arr['foo'] = "3";
50+
$arr['foo'] = '3';
5151

5252
$expected = '{"foo":3}';
5353

5454
$this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context));
5555

5656
$arr = array();
57-
$arr['foo'] = "3";
57+
$arr['foo'] = '3';
5858

5959
$expected = '{"foo":"3"}';
6060

@@ -72,7 +72,7 @@ protected function getObject()
7272
$obj->foo = 'foo';
7373
$obj->bar = array('a', 'b');
7474
$obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));
75-
$obj->qux = "1";
75+
$obj->qux = '1';
7676

7777
return $obj;
7878
}

Tests/Encoder/XmlEncoderTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp()
3232
public function testEncodeScalar()
3333
{
3434
$obj = new ScalarDummy();
35-
$obj->xmlFoo = "foo";
35+
$obj->xmlFoo = 'foo';
3636

3737
$expected = '<?xml version="1.0"?>'."\n".
3838
'<response>foo</response>'."\n";
@@ -43,7 +43,7 @@ public function testEncodeScalar()
4343
public function testSetRootNodeName()
4444
{
4545
$obj = new ScalarDummy();
46-
$obj->xmlFoo = "foo";
46+
$obj->xmlFoo = 'foo';
4747

4848
$this->encoder->setRootNodeName('test');
4949
$expected = '<?xml version="1.0"?>'."\n".
@@ -70,11 +70,11 @@ public function testAttributes()
7070
'@name' => 'Bar',
7171
),
7272
'Foo' => array(
73-
'Bar' => "Test",
73+
'Bar' => 'Test',
7474
'@Type' => 'test',
7575
),
7676
'föo_bär' => 'a',
77-
"Bar" => array(1,2,3),
77+
'Bar' => array(1,2,3),
7878
'a' => 'b',
7979
);
8080
$expected = '<?xml version="1.0"?>'."\n".
@@ -356,28 +356,28 @@ public function testDecodeWithoutItemHash()
356356
$obj = new ScalarDummy();
357357
$obj->xmlFoo = array(
358358
'foo-bar' => array(
359-
'@key' => "value",
360-
'item' => array("@key" => 'key', "key-val" => 'val'),
359+
'@key' => 'value',
360+
'item' => array('@key' => 'key', 'key-val' => 'val'),
361361
),
362362
'Foo' => array(
363-
'Bar' => "Test",
363+
'Bar' => 'Test',
364364
'@Type' => 'test',
365365
),
366366
'föo_bär' => 'a',
367-
"Bar" => array(1,2,3),
367+
'Bar' => array(1,2,3),
368368
'a' => 'b',
369369
);
370370
$expected = array(
371371
'foo-bar' => array(
372-
'@key' => "value",
373-
'key' => array('@key' => 'key', "key-val" => 'val'),
372+
'@key' => 'value',
373+
'key' => array('@key' => 'key', 'key-val' => 'val'),
374374
),
375375
'Foo' => array(
376-
'Bar' => "Test",
376+
'Bar' => 'Test',
377377
'@Type' => 'test',
378378
),
379379
'föo_bär' => 'a',
380-
"Bar" => array(1,2,3),
380+
'Bar' => array(1,2,3),
381381
'a' => 'b',
382382
);
383383
$xml = $this->encoder->encode($obj, 'xml');
@@ -483,7 +483,7 @@ protected function getObject()
483483
$obj->foo = 'foo';
484484
$obj->bar = array('a', 'b');
485485
$obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));
486-
$obj->qux = "1";
486+
$obj->qux = '1';
487487

488488
return $obj;
489489
}

Tests/Normalizer/GetSetMethodNormalizerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function setCamelCase($camelCase)
374374

375375
public function otherMethod()
376376
{
377-
throw new \RuntimeException("Dummy::otherMethod() should not be called");
377+
throw new \RuntimeException('Dummy::otherMethod() should not be called');
378378
}
379379

380380
public function setObject($object)
@@ -418,7 +418,7 @@ public function isBaz()
418418

419419
public function otherMethod()
420420
{
421-
throw new \RuntimeException("Dummy::otherMethod() should not be called");
421+
throw new \RuntimeException('Dummy::otherMethod() should not be called');
422422
}
423423
}
424424

@@ -456,6 +456,6 @@ public function getBaz()
456456

457457
public function otherMethod()
458458
{
459-
throw new \RuntimeException("Dummy::otherMethod() should not be called");
459+
throw new \RuntimeException('Dummy::otherMethod() should not be called');
460460
}
461461
}

0 commit comments

Comments
 (0)