mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Dependency updates and update version number
This commit is contained in:
@@ -26,28 +26,18 @@ class SelectorNode extends AbstractNode
|
||||
private $tree;
|
||||
private $pseudoElement;
|
||||
|
||||
/**
|
||||
* @param NodeInterface $tree
|
||||
* @param null|string $pseudoElement
|
||||
*/
|
||||
public function __construct(NodeInterface $tree, $pseudoElement = null)
|
||||
public function __construct(NodeInterface $tree, string $pseudoElement = null)
|
||||
{
|
||||
$this->tree = $tree;
|
||||
$this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NodeInterface
|
||||
*/
|
||||
public function getTree()
|
||||
public function getTree(): NodeInterface
|
||||
{
|
||||
return $this->tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
public function getPseudoElement()
|
||||
public function getPseudoElement(): ?string
|
||||
{
|
||||
return $this->pseudoElement;
|
||||
}
|
||||
@@ -55,7 +45,7 @@ class SelectorNode extends AbstractNode
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSpecificity()
|
||||
public function getSpecificity(): Specificity
|
||||
{
|
||||
return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0));
|
||||
}
|
||||
@@ -63,7 +53,7 @@ class SelectorNode extends AbstractNode
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user