diff vendor/symfony/serializer/Encoder/ChainEncoder.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
line wrap: on
line diff
--- a/vendor/symfony/serializer/Encoder/ChainEncoder.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/serializer/Encoder/ChainEncoder.php	Thu Feb 28 13:21:36 2019 +0000
@@ -24,10 +24,10 @@
  */
 class ChainEncoder implements EncoderInterface /*, ContextAwareEncoderInterface*/
 {
-    protected $encoders = array();
-    protected $encoderByFormat = array();
+    protected $encoders = [];
+    protected $encoderByFormat = [];
 
-    public function __construct(array $encoders = array())
+    public function __construct(array $encoders = [])
     {
         $this->encoders = $encoders;
     }
@@ -35,7 +35,7 @@
     /**
      * {@inheritdoc}
      */
-    final public function encode($data, $format, array $context = array())
+    final public function encode($data, $format, array $context = [])
     {
         return $this->getEncoder($format, $context)->encode($data, $format, $context);
     }
@@ -43,9 +43,9 @@
     /**
      * {@inheritdoc}
      */
-    public function supportsEncoding($format/*, array $context = array()*/)
+    public function supportsEncoding($format/*, array $context = []*/)
     {
-        $context = func_num_args() > 1 ? func_get_arg(1) : array();
+        $context = \func_num_args() > 1 ? func_get_arg(1) : [];
 
         try {
             $this->getEncoder($format, $context);
@@ -64,9 +64,9 @@
      *
      * @return bool
      */
-    public function needsNormalization($format/*, array $context = array()*/)
+    public function needsNormalization($format/*, array $context = []*/)
     {
-        $context = func_num_args() > 1 ? func_get_arg(1) : array();
+        $context = \func_num_args() > 1 ? func_get_arg(1) : [];
         $encoder = $this->getEncoder($format, $context);
 
         if (!$encoder instanceof NormalizationAwareInterface) {