Skip to content

Commit 6978e34

Browse files
committed
merged 2.0
2 parents 282a6ed + 23fa9f4 commit 6978e34

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

CssSelector.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ static public function toXPath($cssExpr, $prefix = 'descendant-or-self::')
8484
* Parses an expression and returns the Node object that represents
8585
* the parsed expression.
8686
*
87-
* @throws \Exception When tokenizer throws it while parsing
88-
*
8987
* @param string $string The expression to parse
9088
*
9189
* @return Node\NodeInterface
90+
*
91+
* @throws \Exception When tokenizer throws it while parsing
9292
*/
9393
public function parse($string)
9494
{
@@ -136,11 +136,11 @@ private function parseSelectorGroup($stream)
136136
* Parses a selector contained in $stream and returns the Node
137137
* object that represents it.
138138
*
139-
* @throws ParseException When expected selector but got something else
140-
*
141139
* @param TokenStream $stream The stream containing the selector.
142140
*
143141
* @return Node\NodeInterface
142+
*
143+
* @throws ParseException When expected selector but got something else
144144
*/
145145
private function parseSelector($stream)
146146
{
@@ -177,11 +177,11 @@ private function parseSelector($stream)
177177
* Parses a simple selector (the current token) from $stream and returns
178178
* the resulting Node object.
179179
*
180-
* @throws ParseException When expected symbol but got something else
181-
*
182180
* @param TokenStream $stream The stream containing the selector.
183181
*
184182
* @return Node\NodeInterface
183+
*
184+
* @throws ParseException When expected symbol but got something else
185185
*/
186186
private function parseSimpleSelector($stream)
187187
{
@@ -284,13 +284,13 @@ private function parseSimpleSelector($stream)
284284
* Parses an attribute from a selector contained in $stream and returns
285285
* the resulting AttribNode object.
286286
*
287-
* @throws ParseException When encountered unexpected selector
288-
*
289287
* @param Node\NodeInterface $selector The selector object whose attribute
290288
* is to be parsed.
291289
* @param TokenStream $stream The container token stream.
292290
*
293291
* @return Node\AttribNode
292+
*
293+
* @throws ParseException When encountered unexpected selector
294294
*/
295295
private function parseAttrib($selector, $stream)
296296
{

Node/CombinedSelectorNode.php

+8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public function toXpath()
7979
*
8080
* @param XPathExpr $xpath The XPath expression for this object
8181
* @param NodeInterface $sub The NodeInterface object to add
82+
*
83+
* @return XPathExpr An XPath instance
8284
*/
8385
protected function _xpath_descendant($xpath, $sub)
8486
{
@@ -93,6 +95,8 @@ protected function _xpath_descendant($xpath, $sub)
9395
*
9496
* @param XPathExpr $xpath The parent XPath expression
9597
* @param NodeInterface $sub The NodeInterface object to add
98+
*
99+
* @return XPathExpr An XPath instance
96100
*/
97101
protected function _xpath_child($xpath, $sub)
98102
{
@@ -107,6 +111,8 @@ protected function _xpath_child($xpath, $sub)
107111
*
108112
* @param XPathExpr $xpath The parent XPath expression
109113
* @param NodeInterface $sub The adjacent XPath expression
114+
*
115+
* @return XPathExpr An XPath instance
110116
*/
111117
protected function _xpath_direct_adjacent($xpath, $sub)
112118
{
@@ -123,6 +129,8 @@ protected function _xpath_direct_adjacent($xpath, $sub)
123129
*
124130
* @param XPathExpr $xpath The parent XPath expression
125131
* @param NodeInterface $sub The indirect adjacent NodeInterface object
132+
*
133+
* @return XPathExpr An XPath instance
126134
*/
127135
protected function _xpath_indirect_adjacent($xpath, $sub)
128136
{

Tokenizer.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ public function tokenize($s)
109109
* and returns an array holding the unquoted string contained by $s and
110110
* the new position from which tokenizing should take over.
111111
*
112-
* @throws ParseException When expected closing is not found
113-
*
114112
* @param string $s The selector string containing the quoted string.
115113
* @param integer $pos The starting position for the quoted string.
116114
*
117115
* @return array
116+
*
117+
* @throws ParseException When expected closing is not found
118118
*/
119119
private function tokenizeEscapedString($s, $pos)
120120
{
@@ -146,11 +146,11 @@ private function tokenizeEscapedString($s, $pos)
146146
/**
147147
* Unescapes a string literal and returns the unescaped string.
148148
*
149-
* @throws ParseException When invalid escape sequence is found
150-
*
151149
* @param string $literal The string literal to unescape.
152150
*
153151
* @return string
152+
*
153+
* @throws ParseException When invalid escape sequence is found
154154
*/
155155
private function unescapeStringLiteral($literal)
156156
{
@@ -172,12 +172,12 @@ private function unescapeStringLiteral($literal)
172172
* contained in it and the new position from which tokenizing should take
173173
* over.
174174
*
175-
* @throws ParseException When Unexpected symbol is found
176-
*
177175
* @param string $s The selector string.
178176
* @param integer $pos The position in $s at which the symbol starts.
179177
*
180178
* @return array
179+
*
180+
* @throws ParseException When Unexpected symbol is found
181181
*/
182182
private function tokenizeSymbol($s, $pos)
183183
{

0 commit comments

Comments
 (0)