@@ -12,7 +12,6 @@ |
||
12 | 12 | |
13 | 13 | use Lechimp\Dicto\Regexp; |
14 | 14 | use Lechimp\Dicto\Analysis\Index; |
15 | -use Lechimp\Dicto\Analysis\Violation; |
|
16 | 15 | use Lechimp\Dicto\Definition\ArgumentParser; |
17 | 16 | use Lechimp\Dicto\Graph\Node; |
18 | 17 | use Lechimp\Dicto\Graph\PredicateFactory; |
@@ -160,6 +160,9 @@ |
||
160 | 160 | ); |
161 | 161 | } |
162 | 162 | |
163 | + /** |
|
164 | + * @param boolean $negate |
|
165 | + */ |
|
163 | 166 | protected function regexp_source_filter(PredicateFactory $f, Regexp $regexp, $negate) |
164 | 167 | { |
165 | 168 | assert('is_bool($negate)'); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * Load extra configs from yaml files. |
80 | 80 | * |
81 | 81 | * @param array $config_file_paths |
82 | - * @return array |
|
82 | + * @return Config |
|
83 | 83 | */ |
84 | 84 | protected function load_config(array $config_file_paths) |
85 | 85 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @param string $atom |
47 | - * @return Name |
|
47 | + * @return Atom |
|
48 | 48 | */ |
49 | 49 | public function atom($atom) |
50 | 50 | { |
@@ -126,11 +126,8 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
129 | - * @param Definition $left |
|
130 | 129 | * @param Qualifier $qualifier |
131 | - * @param Atom $id |
|
132 | - * @param Parameter[] $parameters |
|
133 | - * @return Property |
|
130 | + * @return Rule |
|
134 | 131 | */ |
135 | 132 | public function rule(Qualifier $qualifier, Definition $definition) |
136 | 133 | { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // IMPLEMENTATION OF Parser |
164 | 164 | |
165 | 165 | /** |
166 | - * @return Ruleset |
|
166 | + * @return AST\Root |
|
167 | 167 | */ |
168 | 168 | public function parse($source) |
169 | 169 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * Root expression for the parser is some whitespace or comment where a |
177 | 177 | * top level statement is in the middle. |
178 | 178 | * |
179 | - * @return Ruleset |
|
179 | + * @return AST\Root |
|
180 | 180 | */ |
181 | 181 | protected function root() |
182 | 182 | { |
@@ -240,6 +240,7 @@ discard block |
||
240 | 240 | |
241 | 241 | /** |
242 | 242 | * @param string |
243 | + * @param string $content |
|
243 | 244 | * @return string |
244 | 245 | */ |
245 | 246 | protected function trim_explanation($content) |
@@ -267,7 +268,7 @@ discard block |
||
267 | 268 | /** |
268 | 269 | * Fetch a string from the stream. |
269 | 270 | * |
270 | - * @return string |
|
271 | + * @return AST\StringValue |
|
271 | 272 | */ |
272 | 273 | protected function string() |
273 | 274 | { |
@@ -287,7 +288,7 @@ discard block |
||
287 | 288 | /** |
288 | 289 | * Fetch a variable from the stream. |
289 | 290 | * |
290 | - * @return V\Variable |
|
291 | + * @return AST\Definition |
|
291 | 292 | */ |
292 | 293 | protected function variable($right_binding_power = 0) |
293 | 294 | { |
@@ -348,7 +349,7 @@ discard block |
||
348 | 349 | /** |
349 | 350 | * Fetch a rule schema and its arguments from the stream. |
350 | 351 | * |
351 | - * @return array (R\Schema, array) |
|
352 | + * @return AST\Atom (R\Schema, array) |
|
352 | 353 | */ |
353 | 354 | protected function schema() |
354 | 355 | { |
@@ -367,7 +368,7 @@ discard block |
||
367 | 368 | /** |
368 | 369 | * Process a variable assignment. |
369 | 370 | * |
370 | - * @return null |
|
371 | + * @return AST\Assignment |
|
371 | 372 | */ |
372 | 373 | protected function variable_assignment() |
373 | 374 | { |
@@ -381,7 +382,7 @@ discard block |
||
381 | 382 | /** |
382 | 383 | * Process a rule declaration. |
383 | 384 | * |
384 | - * @return null |
|
385 | + * @return AST\Rule |
|
385 | 386 | */ |
386 | 387 | protected function rule_declaration() |
387 | 388 | { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * Compile an AST to an according entity. |
87 | 87 | * |
88 | 88 | * @param AST\Node $node |
89 | - * @return mixed |
|
89 | + * @return Ruleset |
|
90 | 90 | */ |
91 | 91 | public function compile(AST\Root $node) |
92 | 92 | { |
@@ -215,6 +215,9 @@ discard block |
||
215 | 215 | return $parameters; |
216 | 216 | } |
217 | 217 | |
218 | + /** |
|
219 | + * @return string |
|
220 | + */ |
|
218 | 221 | protected function compile_qualifier(AST\Qualifier $node) |
219 | 222 | { |
220 | 223 | $which = $node->which(); |
@@ -251,7 +254,7 @@ discard block |
||
251 | 254 | * Get a predefined variable. |
252 | 255 | * |
253 | 256 | * @param string $name |
254 | - * @return V\Variable |
|
257 | + * @return V\Variable[] |
|
255 | 258 | */ |
256 | 259 | protected function get_variable($name) |
257 | 260 | { |
@@ -265,7 +268,7 @@ discard block |
||
265 | 268 | * Get a property. Yes. Really. |
266 | 269 | * |
267 | 270 | * @param string $name |
268 | - * @return V\Property |
|
271 | + * @return R\Property[] |
|
269 | 272 | */ |
270 | 273 | protected function get_property($name) |
271 | 274 | { |
@@ -279,7 +282,7 @@ discard block |
||
279 | 282 | * Get a schema. By name. |
280 | 283 | * |
281 | 284 | * @param string $name |
282 | - * @return V\Schema |
|
285 | + * @return R\Schema |
|
283 | 286 | */ |
284 | 287 | protected function get_schema($name) |
285 | 288 | { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
114 | - * @return Iterator <[Node,mixed]> |
|
114 | + * @return \Generator <[Node,mixed]> |
|
115 | 115 | */ |
116 | 116 | protected function switch_run_command(\Iterator $nodes, $step) |
117 | 117 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | - * @return Iterator <[Node,mixed]> |
|
131 | + * @return \Generator <[Node,mixed]> |
|
132 | 132 | */ |
133 | 133 | protected function run_expand(\Iterator $nodes, \Closure $clsr) |
134 | 134 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | - * @return Iterator <[Node,mixed]> |
|
146 | + * @return \Generator <[Node,mixed]> |
|
147 | 147 | */ |
148 | 148 | protected function run_extract(\Iterator $nodes, \Closure $clsr) |
149 | 149 | { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
162 | - * @return Iterator <[Node,mixed]> |
|
162 | + * @return \Generator <[Node,mixed]> |
|
163 | 163 | */ |
164 | 164 | protected function run_filter(\Iterator $nodes, \Closure $predicate) |
165 | 165 | { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
177 | - * @return Iterator <[Node,mixed]> |
|
177 | + * @return \Generator <[Node,mixed]> |
|
178 | 178 | */ |
179 | 179 | protected function add_result(\Iterator $nodes, &$result) |
180 | 180 | { |
@@ -88,6 +88,7 @@ |
||
88 | 88 | /** |
89 | 89 | * Initialize the filesystem abstraction. |
90 | 90 | * |
91 | + * @param string $path |
|
91 | 92 | * @return Flightcontrol |
92 | 93 | */ |
93 | 94 | public function init_flightcontrol($path) |
@@ -96,6 +96,7 @@ |
||
96 | 96 | * If that is also not the case, we assume the class is in the global |
97 | 97 | * namespace. |
98 | 98 | * |
99 | + * @param string $name |
|
99 | 100 | * @return string |
100 | 101 | */ |
101 | 102 | protected function fully_qualified_class_name($name) |
@@ -117,7 +117,7 @@ |
||
117 | 117 | * Get information about a run. |
118 | 118 | * |
119 | 119 | * @param int $run |
120 | - * @return array<string,string> with keys 'commit_hash' |
|
120 | + * @return integer with keys 'commit_hash' |
|
121 | 121 | */ |
122 | 122 | public function run_info($run) |
123 | 123 | { |