laravel-6 support

This commit is contained in:
RafficMohammed
2023-01-08 01:17:22 +05:30
parent 1a5c16ae4b
commit 774eed8b0e
4962 changed files with 279380 additions and 297961 deletions

View File

@@ -23,39 +23,13 @@ namespace Symfony\Component\CssSelector\Node;
*/
class AttributeNode extends AbstractNode
{
/**
* @var NodeInterface
*/
private $selector;
/**
* @var string
*/
private $namespace;
/**
* @var string
*/
private $attribute;
/**
* @var string
*/
private $operator;
/**
* @var string
*/
private $value;
/**
* @param NodeInterface $selector
* @param string $namespace
* @param string $attribute
* @param string $operator
* @param string $value
*/
public function __construct(NodeInterface $selector, $namespace, $attribute, $operator, $value)
public function __construct(NodeInterface $selector, ?string $namespace, string $attribute, string $operator, ?string $value)
{
$this->selector = $selector;
$this->namespace = $namespace;
@@ -64,42 +38,27 @@ class AttributeNode extends AbstractNode
$this->value = $value;
}
/**
* @return NodeInterface
*/
public function getSelector()
public function getSelector(): NodeInterface
{
return $this->selector;
}
/**
* @return string
*/
public function getNamespace()
public function getNamespace(): ?string
{
return $this->namespace;
}
/**
* @return string
*/
public function getAttribute()
public function getAttribute(): string
{
return $this->attribute;
}
/**
* @return string
*/
public function getOperator()
public function getOperator(): string
{
return $this->operator;
}
/**
* @return string
*/
public function getValue()
public function getValue(): ?string
{
return $this->value;
}
@@ -107,15 +66,12 @@ class AttributeNode extends AbstractNode
/**
* {@inheritdoc}
*/
public function getSpecificity()
public function getSpecificity(): Specificity
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
/**
* {@inheritdoc}
*/
public function __toString()
public function __toString(): string
{
$attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute;