laravel-6 support
This commit is contained in:
@@ -23,38 +23,21 @@ namespace Symfony\Component\CssSelector\Node;
|
||||
*/
|
||||
class NegationNode extends AbstractNode
|
||||
{
|
||||
/**
|
||||
* @var NodeInterface
|
||||
*/
|
||||
private $selector;
|
||||
|
||||
/**
|
||||
* @var NodeInterface
|
||||
*/
|
||||
private $subSelector;
|
||||
|
||||
/**
|
||||
* @param NodeInterface $selector
|
||||
* @param NodeInterface $subSelector
|
||||
*/
|
||||
public function __construct(NodeInterface $selector, NodeInterface $subSelector)
|
||||
{
|
||||
$this->selector = $selector;
|
||||
$this->subSelector = $subSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NodeInterface
|
||||
*/
|
||||
public function getSelector()
|
||||
public function getSelector(): NodeInterface
|
||||
{
|
||||
return $this->selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NodeInterface
|
||||
*/
|
||||
public function getSubSelector()
|
||||
public function getSubSelector(): NodeInterface
|
||||
{
|
||||
return $this->subSelector;
|
||||
}
|
||||
@@ -62,15 +45,12 @@ class NegationNode extends AbstractNode
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSpecificity()
|
||||
public function getSpecificity(): Specificity
|
||||
{
|
||||
return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
|
||||
}
|
||||
|
Reference in New Issue
Block a user