@@ -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 ] ) ) { |
@@ -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 |
@@ -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'] ) { |
@@ -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 | } |
@@ -144,7 +144,7 @@ |
||
144 | 144 | * |
145 | 145 | * @since 1.0.0 |
146 | 146 | * |
147 | - * @return WordPoints_Hook_Reaction_Validator|null The validator or null if none. |
|
147 | + * @return WordPoints_Hook_Reaction_Validator The validator or null if none. |
|
148 | 148 | */ |
149 | 149 | public function get_validator() { |
150 | 150 | return $this->validator; |
@@ -58,8 +58,20 @@ discard block |
||
58 | 58 | |
59 | 59 | // this is basically a reactor |
60 | 60 | interface WordPoints_Entity_Change_ListenerI { |
61 | + |
|
62 | + /** |
|
63 | + * @return void |
|
64 | + */ |
|
61 | 65 | public function created( WordPoints_Entity $entity ); |
66 | + |
|
67 | + /** |
|
68 | + * @return void |
|
69 | + */ |
|
62 | 70 | public function updated( WordPoints_Entity $before, WordPoints_Entity $after ); |
71 | + |
|
72 | + /** |
|
73 | + * @return void |
|
74 | + */ |
|
63 | 75 | public function deleted( WordPoints_Entity $entity ); |
64 | 76 | } |
65 | 77 | |
@@ -129,6 +141,9 @@ discard block |
||
129 | 141 | return true; |
130 | 142 | } |
131 | 143 | |
144 | + /** |
|
145 | + * @param string $type |
|
146 | + */ |
|
132 | 147 | protected function fire_event( $type, WordPoints_Entity $entity ) { |
133 | 148 | |
134 | 149 | $args = new WordPoints_Hook_Event_Args( array() ); |
@@ -73,12 +73,28 @@ discard block |
||
73 | 73 | |
74 | 74 | |
75 | 75 | interface WordPoints_WPDB_Query_Data { |
76 | + |
|
77 | + /** |
|
78 | + * @return string |
|
79 | + */ |
|
76 | 80 | public function get_table_name(); |
81 | + |
|
82 | + /** |
|
83 | + * @return void |
|
84 | + */ |
|
77 | 85 | public function get_where_clause(); |
78 | 86 | } |
79 | 87 | |
80 | 88 | interface WordPoints_MySQL_Query_Parser_SimpleI { |
89 | + |
|
90 | + /** |
|
91 | + * @return void |
|
92 | + */ |
|
81 | 93 | public function get_table_name(); |
94 | + |
|
95 | + /** |
|
96 | + * @return string |
|
97 | + */ |
|
82 | 98 | public function get_where_clause(); |
83 | 99 | } |
84 | 100 | |
@@ -164,6 +180,10 @@ discard block |
||
164 | 180 | } |
165 | 181 | |
166 | 182 | interface WordPoints_WPDB_Query_WrapperI { |
183 | + |
|
184 | + /** |
|
185 | + * @return void |
|
186 | + */ |
|
167 | 187 | public function __construct( $slug, $args, $wpdb ); |
168 | 188 | public function execute(); |
169 | 189 |