Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/css-selector/XPath/Translator.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/css-selector/XPath/Translator.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/css-selector/XPath/Translator.php Thu Feb 28 13:21:36 2019 +0000 @@ -35,18 +35,18 @@ /** * @var ParserInterface[] */ - private $shortcutParsers = array(); + private $shortcutParsers = []; /** * @var Extension\ExtensionInterface[] */ - private $extensions = array(); + private $extensions = []; - private $nodeTranslators = array(); - private $combinationTranslators = array(); - private $functionTranslators = array(); - private $pseudoClassTranslators = array(); - private $attributeMatchingTranslators = array(); + private $nodeTranslators = []; + private $combinationTranslators = []; + private $functionTranslators = []; + private $pseudoClassTranslators = []; + private $attributeMatchingTranslators = []; public function __construct(ParserInterface $parser = null) { @@ -77,7 +77,7 @@ } $string = $element; - $parts = array(); + $parts = []; while (true) { if (false !== $pos = strpos($string, "'")) { $parts[] = sprintf("'%s'", substr($string, 0, $pos)); @@ -89,7 +89,7 @@ } } - return sprintf('concat(%s)', implode($parts, ', ')); + return sprintf('concat(%s)', implode(', ', $parts)); } /** @@ -176,7 +176,7 @@ throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName())); } - return call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); + return \call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); } /** @@ -194,7 +194,7 @@ throw new ExpressionErrorException(sprintf('Combiner "%s" not supported.', $combiner)); } - return call_user_func($this->combinationTranslators[$combiner], $this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath)); + return \call_user_func($this->combinationTranslators[$combiner], $this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath)); } /** @@ -208,7 +208,7 @@ throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName())); } - return call_user_func($this->functionTranslators[$function->getName()], $xpath, $function); + return \call_user_func($this->functionTranslators[$function->getName()], $xpath, $function); } /** @@ -225,7 +225,7 @@ throw new ExpressionErrorException(sprintf('Pseudo-class "%s" not supported.', $pseudoClass)); } - return call_user_func($this->pseudoClassTranslators[$pseudoClass], $xpath); + return \call_user_func($this->pseudoClassTranslators[$pseudoClass], $xpath); } /** @@ -244,7 +244,7 @@ throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator)); } - return call_user_func($this->attributeMatchingTranslators[$operator], $xpath, $attribute, $value); + return \call_user_func($this->attributeMatchingTranslators[$operator], $xpath, $attribute, $value); } /**