reinstall dependencies on php 7.4

This commit is contained in:
Attila Jozsef Kerekes
2022-11-14 21:15:40 +01:00
parent 8972a11c0a
commit 98401f20a2
681 changed files with 65697 additions and 9274 deletions

View File

@@ -26,11 +26,11 @@ use Symfony\Component\CssSelector\XPath\Translator;
*/
class CssSelectorConverter
{
private Translator $translator;
private array $cache;
private $translator;
private $cache;
private static array $xmlCache = [];
private static array $htmlCache = [];
private static $xmlCache = [];
private static $htmlCache = [];
/**
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents
@@ -59,9 +59,11 @@ class CssSelectorConverter
*
* Optionally, a prefix can be added to the resulting XPath
* expression with the $prefix parameter.
*
* @return string
*/
public function toXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string
public function toXPath(string $cssExpr, string $prefix = 'descendant-or-self::')
{
return $this->cache[$prefix][$cssExpr] ??= $this->translator->cssToXPath($cssExpr, $prefix);
return $this->cache[$prefix][$cssExpr] ?? $this->cache[$prefix][$cssExpr] = $this->translator->cssToXPath($cssExpr, $prefix);
}
}