Skip to content

Commit 44e806e

Browse files
committed
Fixing typos and cleaning up docblocks
1 parent 498245d commit 44e806e

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

src/CompilerRuntime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
/**
55
* Compiles JMESPath expressions to PHP source code and executes it.
66
*
7-
* JMESPath filenames are stored in the cache directory using the following
7+
* JMESPath file names are stored in the cache directory using the following
88
* logic to determine the filename:
99
*
1010
* 1. Start with the string "jmespath_"
11-
* 2. Append the MD5 checksum of the expresison.
11+
* 2. Append the MD5 checksum of the expression.
1212
* 3. Append ".php"
1313
*/
1414
class CompilerRuntime

src/TreeCompiler.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ private function visit_or(array $node)
110110
->write('}');
111111
}
112112

113-
/**
114-
* Visits a non-terminal subexpression. Subexpressions wrapping nested
115-
* array accessors will be combined into a single if/then block.
116-
*/
117113
private function visit_subexpression(array $node)
118114
{
119115
return $this
@@ -125,9 +121,6 @@ private function visit_subexpression(array $node)
125121
->write('}');
126122
}
127123

128-
/**
129-
* Visits a terminal identifier
130-
*/
131124
private function visit_field(array $node)
132125
{
133126
$arr = '$value[' . var_export($node['value'], true) . ']';
@@ -149,9 +142,6 @@ private function visit_field(array $node)
149142
return $this;
150143
}
151144

152-
/**
153-
* Visits a terminal index
154-
*/
155145
private function visit_index(array $node)
156146
{
157147
if ($node['value'] >= 0) {

src/TreeInterpreter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function visit(array $node, $data)
3636
* Recursively traverses an AST using depth-first, pre-order traversal.
3737
* The evaluation logic for each node type is embedded into a large switch
3838
* statement to avoid the cost of "double dispatch".
39+
* @return mixed
3940
*/
4041
private function dispatch(array $node, $value)
4142
{
@@ -205,6 +206,9 @@ private function dispatch(array $node, $value)
205206
}
206207
}
207208

209+
/**
210+
* @return bool
211+
*/
208212
private static function relativeCmp($left, $right, $cmp)
209213
{
210214
if (!is_int($left) || !is_int($right)) {

0 commit comments

Comments
 (0)