Commaaa2
This commit is contained in:
@@ -26,7 +26,7 @@ use Symfony\Component\CssSelector\XPath\Translator;
|
||||
*/
|
||||
class CssSelectorConverter
|
||||
{
|
||||
private $translator;
|
||||
private Translator $translator;
|
||||
private array $cache;
|
||||
|
||||
private static array $xmlCache = [];
|
||||
@@ -62,6 +62,6 @@ class CssSelectorConverter
|
||||
*/
|
||||
public function toXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string
|
||||
{
|
||||
return $this->cache[$prefix][$cssExpr] ?? $this->cache[$prefix][$cssExpr] = $this->translator->cssToXPath($cssExpr, $prefix);
|
||||
return $this->cache[$prefix][$cssExpr] ??= $this->translator->cssToXPath($cssExpr, $prefix);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user