package and depencies
This commit is contained in:
@@ -31,7 +31,7 @@ class NodeExtension extends AbstractExtension
|
||||
public const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
|
||||
public const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
|
||||
|
||||
private $flags;
|
||||
private int $flags;
|
||||
|
||||
public function __construct(int $flags = 0)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class NodeExtension extends AbstractExtension
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setFlag(int $flag, bool $on): self
|
||||
public function setFlag(int $flag, bool $on): static
|
||||
{
|
||||
if ($on && !$this->hasFlag($flag)) {
|
||||
$this->flags += $flag;
|
||||
@@ -59,21 +59,18 @@ class NodeExtension extends AbstractExtension
|
||||
return (bool) ($this->flags & $flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getNodeTranslators(): array
|
||||
{
|
||||
return [
|
||||
'Selector' => [$this, 'translateSelector'],
|
||||
'CombinedSelector' => [$this, 'translateCombinedSelector'],
|
||||
'Negation' => [$this, 'translateNegation'],
|
||||
'Function' => [$this, 'translateFunction'],
|
||||
'Pseudo' => [$this, 'translatePseudo'],
|
||||
'Attribute' => [$this, 'translateAttribute'],
|
||||
'Class' => [$this, 'translateClass'],
|
||||
'Hash' => [$this, 'translateHash'],
|
||||
'Element' => [$this, 'translateElement'],
|
||||
'Selector' => $this->translateSelector(...),
|
||||
'CombinedSelector' => $this->translateCombinedSelector(...),
|
||||
'Negation' => $this->translateNegation(...),
|
||||
'Function' => $this->translateFunction(...),
|
||||
'Pseudo' => $this->translatePseudo(...),
|
||||
'Attribute' => $this->translateAttribute(...),
|
||||
'Class' => $this->translateClass(...),
|
||||
'Hash' => $this->translateHash(...),
|
||||
'Element' => $this->translateElement(...),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -182,9 +179,6 @@ class NodeExtension extends AbstractExtension
|
||||
return $xpath;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'node';
|
||||
|
Reference in New Issue
Block a user