@@ -9,17 +9,49 @@ discard block |
||
9 | 9 | |
10 | 10 | interface WordPoints_HierarchyI { |
11 | 11 | public function get(); |
12 | + |
|
13 | + /** |
|
14 | + * @return void |
|
15 | + */ |
|
12 | 16 | public function push( $field, $data ); |
17 | + |
|
18 | + /** |
|
19 | + * @return void |
|
20 | + */ |
|
13 | 21 | public function pop(); |
14 | 22 | public function set_field( $field, $value ); |
23 | + |
|
24 | + /** |
|
25 | + * @param string $field |
|
26 | + * @param string $sub |
|
27 | + * @param string $sub_2 |
|
28 | + */ |
|
15 | 29 | public function get_field( $field, $sub = null, $sub_2 = null ); |
16 | 30 | public function get_id(); |
17 | 31 | public function go_to( $id ); |
32 | + |
|
33 | + /** |
|
34 | + * @param string $field |
|
35 | + * |
|
36 | + * @return void |
|
37 | + */ |
|
18 | 38 | public function push_to( $field, $value ); |
39 | + |
|
40 | + /** |
|
41 | + * @return boolean |
|
42 | + */ |
|
19 | 43 | public function ascend(); |
44 | + |
|
45 | + /** |
|
46 | + * @return boolean |
|
47 | + */ |
|
20 | 48 | public function descend( $to = null ); |
21 | 49 | public function is_main(); |
22 | 50 | public function next(); |
51 | + |
|
52 | + /** |
|
53 | + * @return void |
|
54 | + */ |
|
23 | 55 | public function reset(); |
24 | 56 | } |
25 | 57 | |
@@ -134,6 +166,9 @@ discard block |
||
134 | 166 | protected $current = 0; |
135 | 167 | protected $i = 0; |
136 | 168 | |
169 | + /** |
|
170 | + * @param string $descendant_index |
|
171 | + */ |
|
137 | 172 | public function __construct( $descendant_index ) { |
138 | 173 | $this->descendant_index = $descendant_index; |
139 | 174 | } |
@@ -196,10 +231,16 @@ discard block |
||
196 | 231 | $this->current = 0; |
197 | 232 | } |
198 | 233 | |
234 | + /** |
|
235 | + * @param string $field |
|
236 | + */ |
|
199 | 237 | public function set_field( $field, $value ) { |
200 | 238 | $this->hierarchy[ $this->current ][ $field ] = $value; |
201 | 239 | } |
202 | 240 | |
241 | + /** |
|
242 | + * @param string $field |
|
243 | + */ |
|
203 | 244 | public function get_field( $field, $sub = null, $sub_2 = null ) { |
204 | 245 | |
205 | 246 | if ( ! isset( $this->hierarchy[ $this->current ][ $field ] ) ) { |
@@ -225,6 +266,9 @@ discard block |
||
225 | 266 | return $this->hierarchy[ $this->current ][ $field ]; |
226 | 267 | } |
227 | 268 | |
269 | + /** |
|
270 | + * @param string $field |
|
271 | + */ |
|
228 | 272 | public function push_to( $field, $value ) { |
229 | 273 | |
230 | 274 | if ( ! isset( $this->hierarchy[ $this->current ][ $field ] ) ) { |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * |
180 | 180 | * @param string $event_slug The slug of the event this reaction is for. |
181 | 181 | * |
182 | - * @return int|false The reaction ID, or false if not created. |
|
182 | + * @return integer The reaction ID, or false if not created. |
|
183 | 183 | */ |
184 | 184 | abstract protected function _create_reaction( $event_slug ); |
185 | 185 | } |
@@ -73,6 +73,10 @@ |
||
73 | 73 | |
74 | 74 | |
75 | 75 | interface WordPoints_Hook_Reactor_RetroactiveI extends WordPoints_Hook_Retroactive_Query_ModifierI { |
76 | + |
|
77 | + /** |
|
78 | + * @return void |
|
79 | + */ |
|
76 | 80 | public function retroactive_hit( $target, array $records, WordPoints_Hook_Event_RetroactiveI $event, WordPoints_Hook_ReactionI $reaction ); |
77 | 81 | } |
78 | 82 |
@@ -8,12 +8,32 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | interface WordPoints_Hook_Reaction_SettingI { |
11 | + |
|
12 | + /** |
|
13 | + * @return void |
|
14 | + */ |
|
11 | 15 | public function __construct( $slug ); |
16 | + |
|
17 | + /** |
|
18 | + * @return string |
|
19 | + */ |
|
12 | 20 | public function get_type(); |
21 | + |
|
22 | + /** |
|
23 | + * @return string |
|
24 | + */ |
|
13 | 25 | public function get_label(); |
26 | + |
|
27 | + /** |
|
28 | + * @return boolean |
|
29 | + */ |
|
14 | 30 | public function is_required(); |
15 | 31 | public function get( WordPoints_Hook_ReactionI $reaction ); |
16 | 32 | public function validate( $value, WordPoints_Hook_Reaction_Validator $validator ); |
33 | + |
|
34 | + /** |
|
35 | + * @return void |
|
36 | + */ |
|
17 | 37 | public function save( $value, WordPoints_Hook_ReactionI $reaction, $is_new ); |
18 | 38 | } |
19 | 39 |
@@ -9,12 +9,36 @@ |
||
9 | 9 | |
10 | 10 | |
11 | 11 | interface WordPoints_Query_BuilderI { |
12 | + |
|
13 | + /** |
|
14 | + * @return void |
|
15 | + */ |
|
12 | 16 | public function set_fields( $fields ); |
17 | + |
|
18 | + /** |
|
19 | + * @return void |
|
20 | + */ |
|
13 | 21 | public function add_field( $field ); |
22 | + |
|
23 | + /** |
|
24 | + * @return void |
|
25 | + */ |
|
14 | 26 | public function set_table( $table_name ); |
15 | 27 | public function get_table(); |
28 | + |
|
29 | + /** |
|
30 | + * @return void |
|
31 | + */ |
|
16 | 32 | public function enter_join( $join ); |
33 | + |
|
34 | + /** |
|
35 | + * @return void |
|
36 | + */ |
|
17 | 37 | public function exit_join(); |
38 | + |
|
39 | + /** |
|
40 | + * @return void |
|
41 | + */ |
|
18 | 42 | public function where( $condition ); |
19 | 43 | public function get_query(); |
20 | 44 | } |
@@ -284,6 +284,9 @@ |
||
284 | 284 | return $entities; |
285 | 285 | } |
286 | 286 | |
287 | + /** |
|
288 | + * @param integer $count |
|
289 | + */ |
|
287 | 290 | protected function check_count( $count ) { |
288 | 291 | |
289 | 292 | if ( isset( $this->settings['max'] ) && $count > $this->settings['max'] ) { |