updated dependencies + working api connection

This commit is contained in:
Chris
2018-02-08 14:21:29 +00:00
parent dfc3c2194c
commit 30aea8e361
216 changed files with 21763 additions and 915 deletions

View File

@@ -26,18 +26,28 @@ class SelectorNode extends AbstractNode
private $tree;
private $pseudoElement;
public function __construct(NodeInterface $tree, string $pseudoElement = null)
/**
* @param NodeInterface $tree
* @param null|string $pseudoElement
*/
public function __construct(NodeInterface $tree, $pseudoElement = null)
{
$this->tree = $tree;
$this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null;
}
public function getTree(): NodeInterface
/**
* @return NodeInterface
*/
public function getTree()
{
return $this->tree;
}
public function getPseudoElement(): ?string
/**
* @return null|string
*/
public function getPseudoElement()
{
return $this->pseudoElement;
}
@@ -45,7 +55,7 @@ class SelectorNode extends AbstractNode
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
public function getSpecificity()
{
return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0));
}
@@ -53,7 +63,7 @@ class SelectorNode extends AbstractNode
/**
* {@inheritdoc}
*/
public function __toString(): string
public function __toString()
{
return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
}