diff --git a/Parser/TokenStream.php b/Parser/TokenStream.php index f4c2585..70d109f 100644 --- a/Parser/TokenStream.php +++ b/Parser/TokenStream.php @@ -118,9 +118,9 @@ public function getUsed(): array } /** - * Returns nex identifier token. + * Returns next identifier token. * - * @return string The identifier token value + * @return string * * @throws SyntaxErrorException If next token is not an identifier */ @@ -136,9 +136,9 @@ public function getNextIdentifier(): string } /** - * Returns nex identifier or star delimiter token. + * Returns next identifier or null if star delimiter token is found. * - * @return string|null The identifier token value or null if star found + * @return string|null * * @throws SyntaxErrorException If next token is not an identifier or a star delimiter */ diff --git a/XPath/XPathExpr.php b/XPath/XPathExpr.php index 638cbd0..e45ce7d 100644 --- a/XPath/XPathExpr.php +++ b/XPath/XPathExpr.php @@ -43,6 +43,9 @@ public function getElement(): string 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 @@ public function getCondition(): string return $this->condition; } + /** + * @return $this + */ public function addNameTest(): self { if ('*' !== $this->element) { @@ -65,6 +71,9 @@ public function addNameTest(): self return $this; } + /** + * @return $this + */ public function addStarPrefix(): self { $this->path .= '*/';