upgraded dependencies
This commit is contained in:
@@ -203,7 +203,7 @@ class Translator implements TranslatorInterface
|
||||
/**
|
||||
* @throws ExpressionErrorException
|
||||
*/
|
||||
public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, $value): XPathExpr
|
||||
public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
if (!isset($this->attributeMatchingTranslators[$operator])) {
|
||||
throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator));
|
||||
|
@@ -43,6 +43,9 @@ class XPathExpr
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function addCondition(string $condition): self
|
||||
{
|
||||
$this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
|
||||
@@ -55,6 +58,9 @@ class XPathExpr
|
||||
return $this->condition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function addNameTest(): self
|
||||
{
|
||||
if ('*' !== $this->element) {
|
||||
@@ -65,6 +71,9 @@ class XPathExpr
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function addStarPrefix(): self
|
||||
{
|
||||
$this->path .= '*/';
|
||||
|
Reference in New Issue
Block a user