diff --git a/Encoder/XmlEncoder.php b/Encoder/XmlEncoder.php index 86a844e53519..9c7c01b42aa7 100644 --- a/Encoder/XmlEncoder.php +++ b/Encoder/XmlEncoder.php @@ -431,7 +431,7 @@ private function buildXml(\DOMNode $parentNode, $data, string $xmlRootNodeName = /* * Create nodes to append to $parentNode based on the $key of this array * Produces 01 - * From array("item" => array(0,1));. + * From ["item" => [0,1]];. */ foreach ($data as $subData) { $append = $this->appendNode($parentNode, $subData, $key); diff --git a/Normalizer/AbstractNormalizer.php b/Normalizer/AbstractNormalizer.php index 34b02fed1d3e..300c7f1b3c68 100644 --- a/Normalizer/AbstractNormalizer.php +++ b/Normalizer/AbstractNormalizer.php @@ -239,10 +239,10 @@ protected function isCircularReference($object, &$context) * * @throws CircularReferenceException */ - protected function handleCircularReference($object/*, string $format = null, array $context = array()*/) + protected function handleCircularReference($object/*, string $format = null, array $context = []*/) { if (\func_num_args() < 2 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) { - @trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = array()" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = []" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED); } $format = \func_num_args() > 1 ? func_get_arg(1) : null; $context = \func_num_args() > 2 ? func_get_arg(2) : [];