Commaaa2
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user