diff vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php	Thu Feb 28 13:21:36 2019 +0000
@@ -31,16 +31,16 @@
      */
     public function getAttributeMatchingTranslators()
     {
-        return array(
-            'exists' => array($this, 'translateExists'),
-            '=' => array($this, 'translateEquals'),
-            '~=' => array($this, 'translateIncludes'),
-            '|=' => array($this, 'translateDashMatch'),
-            '^=' => array($this, 'translatePrefixMatch'),
-            '$=' => array($this, 'translateSuffixMatch'),
-            '*=' => array($this, 'translateSubstringMatch'),
-            '!=' => array($this, 'translateDifferent'),
-        );
+        return [
+            'exists' => [$this, 'translateExists'],
+            '=' => [$this, 'translateEquals'],
+            '~=' => [$this, 'translateIncludes'],
+            '|=' => [$this, 'translateDashMatch'],
+            '^=' => [$this, 'translatePrefixMatch'],
+            '$=' => [$this, 'translateSuffixMatch'],
+            '*=' => [$this, 'translateSubstringMatch'],
+            '!=' => [$this, 'translateDifferent'],
+        ];
     }
 
     /**
@@ -128,7 +128,7 @@
         return $xpath->addCondition($value ? sprintf(
             '%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s',
             $attribute,
-            strlen($value) - 1,
+            \strlen($value) - 1,
             Translator::getXpathLiteral($value)
         ) : '0');
     }