@@ -210,6 +210,7 @@ discard block |
||
210 | 210 | // IMPLEMENTATION OF Parser |
211 | 211 | |
212 | 212 | /** |
213 | + * @param string $source |
|
213 | 214 | * @return Ruleset |
214 | 215 | */ |
215 | 216 | public function parse($source) { |
@@ -270,6 +271,7 @@ discard block |
||
270 | 271 | |
271 | 272 | /** |
272 | 273 | * @param string |
274 | + * @param string $content |
|
273 | 275 | * @return string |
274 | 276 | */ |
275 | 277 | protected function trim_explanation($content) { |
@@ -338,7 +340,7 @@ discard block |
||
338 | 340 | /** |
339 | 341 | * Fetch a rule schema and its arguments from the stream. |
340 | 342 | * |
341 | - * @return array (R\Schema, array) |
|
343 | + * @return R\Schema (R\Schema, array) |
|
342 | 344 | */ |
343 | 345 | protected function schema() { |
344 | 346 | $t = $this->current_symbol(); |
@@ -126,6 +126,9 @@ |
||
126 | 126 | ); |
127 | 127 | } |
128 | 128 | |
129 | + /** |
|
130 | + * @param boolean $negate |
|
131 | + */ |
|
129 | 132 | protected function regexp_source_filter($regexp, $negate) { |
130 | 133 | assert('is_string($regexp)'); |
131 | 134 | assert('is_bool($negate)'); |
@@ -11,10 +11,8 @@ |
||
11 | 11 | namespace Lechimp\Dicto\Rules; |
12 | 12 | |
13 | 13 | use Lechimp\Dicto\Analysis\Index; |
14 | -use Lechimp\Dicto\Analysis\Violation; |
|
15 | 14 | use Lechimp\Dicto\Definition\ArgumentParser; |
16 | 15 | use Lechimp\Dicto\Indexer\ListenerRegistry; |
17 | -use Lechimp\Dicto\Graph\Node; |
|
18 | 16 | use Lechimp\Dicto\Graph\Relation; |
19 | 17 | |
20 | 18 | /** |
@@ -12,9 +12,7 @@ |
||
12 | 12 | |
13 | 13 | use Lechimp\Dicto\Graph; |
14 | 14 | use Doctrine\DBAL\Schema; |
15 | -use Doctrine\DBAL\Types\Type; |
|
16 | 15 | use Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer; |
17 | -use Doctrine\DBAL\Statement; |
|
18 | 16 | |
19 | 17 | class IndexDB extends DB { |
20 | 18 | /** |
@@ -112,6 +112,9 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @param string $key |
|
117 | + */ |
|
115 | 118 | protected function insert_property($entity_id, $key, $value) { |
116 | 119 | $is_entity = false; |
117 | 120 | if ($value instanceof Graph\Node) { |
@@ -158,6 +161,9 @@ discard block |
||
158 | 161 | } |
159 | 162 | |
160 | 163 | |
164 | + /** |
|
165 | + * @param Graph\IndexDB $index |
|
166 | + */ |
|
161 | 167 | protected function select_properties($id, $index) { |
162 | 168 | $id = (int)$id; |
163 | 169 | $res = $this->connection->executeQuery |
@@ -11,7 +11,6 @@ |
||
11 | 11 | namespace Lechimp\Dicto\Analysis; |
12 | 12 | |
13 | 13 | use Lechimp\Dicto\Rules\Ruleset; |
14 | -use Lechimp\Dicto\Variables\Variable; |
|
15 | 14 | use Psr\Log\LoggerInterface as Log; |
16 | 15 | |
17 | 16 | /** |
@@ -43,6 +43,10 @@ |
||
43 | 43 | return $node; |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param integer $id |
|
48 | + * @param string $type |
|
49 | + */ |
|
46 | 50 | protected function build_node($id, $type, array $properties = null) { |
47 | 51 | return new Node($id, $type, $properties); |
48 | 52 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * A predicate about some property. |
77 | 77 | * |
78 | 78 | * @param string $name |
79 | - * @return PropertyPredicate |
|
79 | + * @return PropertyPredicateFactory |
|
80 | 80 | */ |
81 | 81 | public function _property($name) { |
82 | 82 | return new PropertyPredicateFactory($name); |
@@ -85,7 +85,6 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * A custom predicate. |
87 | 87 | * |
88 | - * @param \Closure $predicate Entity -> bool |
|
89 | 88 | * @return Predicate |
90 | 89 | */ |
91 | 90 | public function _custom(\Closure $closure) { |
@@ -19,6 +19,9 @@ |
||
19 | 19 | */ |
20 | 20 | private $construct_name; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $construct_name |
|
24 | + */ |
|
22 | 25 | public function __construct($construct_name, $name = null) { |
23 | 26 | parent::__construct($name); |
24 | 27 | assert('is_string($construct_name)'); |
@@ -10,7 +10,6 @@ |
||
10 | 10 | |
11 | 11 | namespace Lechimp\Dicto\Variables; |
12 | 12 | |
13 | -use Lechimp\Dicto\Graph\Node; |
|
14 | 13 | use Lechimp\Dicto\Graph\PredicateFactory; |
15 | 14 | |
16 | 15 | /** |