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

@@ -29,7 +29,14 @@ class AttributeNode extends AbstractNode
private $operator;
private $value;
public function __construct(NodeInterface $selector, ?string $namespace, string $attribute, string $operator, ?string $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)
{
$this->selector = $selector;
$this->namespace = $namespace;
@@ -38,27 +45,42 @@ class AttributeNode extends AbstractNode
$this->value = $value;
}
public function getSelector(): NodeInterface
/**
* @return NodeInterface
*/
public function getSelector()
{
return $this->selector;
}
public function getNamespace(): ?string
/**
* @return string
*/
public function getNamespace()
{
return $this->namespace;
}
public function getAttribute(): string
/**
* @return string
*/
public function getAttribute()
{
return $this->attribute;
}
public function getOperator(): string
/**
* @return string
*/
public function getOperator()
{
return $this->operator;
}
public function getValue(): ?string
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
@@ -66,7 +88,7 @@ class AttributeNode extends AbstractNode
/**
* {@inheritdoc}
*/
public function getSpecificity(): Specificity
public function getSpecificity()
{
return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
}
@@ -74,7 +96,7 @@ class AttributeNode extends AbstractNode
/**
* {@inheritdoc}
*/
public function __toString(): string
public function __toString()
{
$attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute;