Prechádzať zdrojové kódy

[Serializer] CS fixes

Jordi Boggiano 14 rokov pred
rodič
commit
b9a2eb66e9

+ 6 - 6
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

@@ -224,14 +224,14 @@ class XmlEncoder extends AbstractEncoder implements DecoderInterface
                     $append = $this->selectNodeType($parentNode, $data);
                 } elseif (is_array($data) && false === is_numeric($key)) {
                     /**
-                    * Is this array fully numeric keys?
-                    */
+                     * Is this array fully numeric keys?
+                     */
                     if (ctype_digit(implode('', array_keys($data)))) {
                         /**
-                        * Create nodes to append to $parentNode based on the $key of this array
-                        * Produces <xml><item>0</item><item>1</item></xml>
-                        * From array("item" => array(0,1));
-                        */
+                         * Create nodes to append to $parentNode based on the $key of this array
+                         * Produces <xml><item>0</item><item>1</item></xml>
+                         * From array("item" => array(0,1));
+                         */
                         foreach ($data as $subData) {
                             $append = $this->appendNode($parentNode, $subData, $key);
                         }

+ 7 - 3
tests/Symfony/Tests/Component/Serializer/Normalizer/GetSetMethodNormalizerTest.php

@@ -29,7 +29,8 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
         $obj->setBar('bar');
         $this->assertEquals(
             array('foo' => 'foo', 'bar' => 'bar', 'foobar' => 'foobar'),
-            $this->normalizer->normalize($obj, 'any'));
+            $this->normalizer->normalize($obj, 'any')
+        );
     }
 
     public function testNormalizeRestricted()
@@ -39,14 +40,17 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
         $obj->setBar('bar');
         $this->assertEquals(
             array('foo' => 'foo'),
-            $this->normalizer->normalize($obj, 'any', array('foo')));
+            $this->normalizer->normalize($obj, 'any', array('foo'))
+        );
     }
 
     public function testDenormalize()
     {
         $obj = $this->normalizer->denormalize(
             array('foo' => 'foo', 'bar' => 'bar', 'foobar' => 'foobar'),
-            __NAMESPACE__.'\GetSetDummy', 'any');
+            __NAMESPACE__.'\GetSetDummy',
+            'any'
+        );
         $this->assertEquals('foo', $obj->getFoo());
         $this->assertEquals('bar', $obj->getBar());
     }