This commit is contained in:
Paolo A
2024-08-13 13:44:16 +00:00
parent 1bbb23088d
commit e796d76612
4001 changed files with 30101 additions and 40075 deletions

View File

@@ -23,12 +23,12 @@ namespace Symfony\Component\CssSelector\Node;
*/
class SelectorNode extends AbstractNode
{
private $tree;
private ?string $pseudoElement;
public function __construct(NodeInterface $tree, string $pseudoElement = null)
{
$this->tree = $tree;
public function __construct(
private NodeInterface $tree,
?string $pseudoElement = null,
) {
$this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null;
}
@@ -42,9 +42,6 @@ class SelectorNode extends AbstractNode
return $this->pseudoElement;
}
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
{
return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0));