Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -26,20 +26,18 @@ use Symfony\Component\CssSelector\XPath\XPathExpr;
*/
class PseudoClassExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*/
public function getPseudoClassTranslators(): array
{
return [
'root' => [$this, 'translateRoot'],
'first-child' => [$this, 'translateFirstChild'],
'last-child' => [$this, 'translateLastChild'],
'first-of-type' => [$this, 'translateFirstOfType'],
'last-of-type' => [$this, 'translateLastOfType'],
'only-child' => [$this, 'translateOnlyChild'],
'only-of-type' => [$this, 'translateOnlyOfType'],
'empty' => [$this, 'translateEmpty'],
'root' => $this->translateRoot(...),
'scope' => $this->translateScopePseudo(...),
'first-child' => $this->translateFirstChild(...),
'last-child' => $this->translateLastChild(...),
'first-of-type' => $this->translateFirstOfType(...),
'last-of-type' => $this->translateLastOfType(...),
'only-child' => $this->translateOnlyChild(...),
'only-of-type' => $this->translateOnlyOfType(...),
'empty' => $this->translateEmpty(...),
];
}
@@ -48,6 +46,11 @@ class PseudoClassExtension extends AbstractExtension
return $xpath->addCondition('not(parent::*)');
}
public function translateScopePseudo(XPathExpr $xpath): XPathExpr
{
return $xpath->addCondition('1');
}
public function translateFirstChild(XPathExpr $xpath): XPathExpr
{
return $xpath
@@ -112,9 +115,6 @@ class PseudoClassExtension extends AbstractExtension
return $xpath->addCondition('not(*) and not(string-length())');
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'pseudo-class';