@@ -298,7 +298,7 @@ |
||
298 | 298 | * |
299 | 299 | * @param array<string> $condition_types |
300 | 300 | * @param array|boolean $environment Environment array or a boolean value to force on conditions |
301 | - * @param array $comparison_operators Array of comparison operators to evaluate regardless of condition type |
|
301 | + * @param string[] $comparison_operators Array of comparison operators to evaluate regardless of condition type |
|
302 | 302 | * @return Fulfillable_Collection |
303 | 303 | */ |
304 | 304 | public function evaluate( $condition_types, $environment, $comparison_operators = array() ) { |
@@ -195,7 +195,7 @@ |
||
195 | 195 | * |
196 | 196 | * @deprecated |
197 | 197 | * @param string|array $role |
198 | - * @return object $this |
|
198 | + * @return User_Meta_Container $this |
|
199 | 199 | */ |
200 | 200 | public function show_on_user_role( $role ) { |
201 | 201 | $roles = is_array( $role ) ? $role : array( $role ); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** |
43 | 43 | * Return a differently formatted value for end-users |
44 | 44 | * |
45 | - * @return mixed |
|
45 | + * @return boolean |
|
46 | 46 | */ |
47 | 47 | public function get_formatted_value() { |
48 | 48 | return ( $this->get_value() === $this->option_value ); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | * |
268 | 268 | * @deprecated |
269 | 269 | * @param int|string $page page ID or page path |
270 | - * @return object $this |
|
270 | + * @return Post_Meta_Container $this |
|
271 | 271 | */ |
272 | 272 | public function show_on_page( $page ) { |
273 | 273 | $page_id = absint( $page ); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * |
290 | 290 | * @deprecated |
291 | 291 | * @param string $parent_page_path |
292 | - * @return object $this |
|
292 | + * @return Post_Meta_Container $this |
|
293 | 293 | */ |
294 | 294 | public function show_on_page_children( $parent_page_path ) { |
295 | 295 | $page = get_page_by_path( $parent_page_path ); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * |
304 | 304 | * @deprecated |
305 | 305 | * @param string|array $template_path |
306 | - * @return object $this |
|
306 | + * @return Post_Meta_Container $this |
|
307 | 307 | */ |
308 | 308 | public function show_on_template( $template_path ) { |
309 | 309 | // Backwards compatibility where only pages support templates |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | * |
322 | 322 | * @deprecated |
323 | 323 | * @param string|array $template_path |
324 | - * @return object $this |
|
324 | + * @return Post_Meta_Container $this |
|
325 | 325 | */ |
326 | 326 | public function hide_on_template( $template_path ) { |
327 | 327 | $template_paths = is_array( $template_path ) ? $template_path : array( $template_path ); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | * |
336 | 336 | * @deprecated |
337 | 337 | * @param int $level |
338 | - * @return object $this |
|
338 | + * @return Post_Meta_Container $this |
|
339 | 339 | */ |
340 | 340 | public function show_on_level( $level ) { |
341 | 341 | $this->where( 'post_level', '=', intval( $level ) ); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | * |
349 | 349 | * @deprecated |
350 | 350 | * @param string|array $post_format Name of the format as listed on Codex |
351 | - * @return object $this |
|
351 | + * @return Post_Meta_Container $this |
|
352 | 352 | */ |
353 | 353 | public function show_on_post_format( $post_format ) { |
354 | 354 | $post_formats = is_array( $post_format ) ? $post_format : array( $post_format ); |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | * Show the container only on posts from the specified type(s). |
361 | 361 | * |
362 | 362 | * @deprecated |
363 | - * @param string|array $post_types |
|
364 | - * @return object $this |
|
363 | + * @param string $post_types |
|
364 | + * @return Post_Meta_Container $this |
|
365 | 365 | */ |
366 | 366 | public function show_on_post_type( $post_types ) { |
367 | 367 | $post_types = is_array( $post_types ) ? $post_types : array( $post_types ); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | * |
377 | 377 | * @deprecated |
378 | 378 | * @param string $category_slug |
379 | - * @return object $this |
|
379 | + * @return Post_Meta_Container $this |
|
380 | 380 | */ |
381 | 381 | public function show_on_category( $category_slug ) { |
382 | 382 | $this->where( 'post_term', '=', array( |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | * @deprecated |
394 | 394 | * @param string $taxonomy_slug |
395 | 395 | * @param string $term_slug |
396 | - * @return object $this |
|
396 | + * @return Post_Meta_Container $this |
|
397 | 397 | */ |
398 | 398 | public function show_on_taxonomy_term( $term_slug, $taxonomy_slug ) { |
399 | 399 | $this->where( 'post_term', '=', array( |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * |
199 | 199 | * @deprecated |
200 | 200 | * @param string|array $taxonomies |
201 | - * @return object $this |
|
201 | + * @return Term_Meta_Container $this |
|
202 | 202 | */ |
203 | 203 | public function show_on_taxonomy( $taxonomies ) { |
204 | 204 | $taxonomies = is_array( $taxonomies ) ? $taxonomies : array( $taxonomies ); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * |
212 | 212 | * @deprecated |
213 | 213 | * @param int $term_level |
214 | - * @return object $this |
|
214 | + * @return Term_Meta_Container $this |
|
215 | 215 | */ |
216 | 216 | public function show_on_level( $term_level ) { |
217 | 217 | $this->where( 'term_level', '=', intval( $term_level ) ); |
@@ -383,6 +383,7 @@ discard block |
||
383 | 383 | /** |
384 | 384 | * Check if all conditions pass for object |
385 | 385 | * |
386 | + * @param integer $object_id |
|
386 | 387 | * @return bool |
387 | 388 | */ |
388 | 389 | protected function all_conditions_pass( $object_id ) { |
@@ -543,7 +544,7 @@ discard block |
||
543 | 544 | * Set datastore instance |
544 | 545 | * |
545 | 546 | * @param Datastore_Interface $datastore |
546 | - * @return object $this |
|
547 | + * @return Container $this |
|
547 | 548 | */ |
548 | 549 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
549 | 550 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -711,7 +712,7 @@ discard block |
||
711 | 712 | * Set CSS classes that the container should use. |
712 | 713 | * |
713 | 714 | * @param string|array<string> $classes |
714 | - * @return object $this |
|
715 | + * @return Container $this |
|
715 | 716 | */ |
716 | 717 | public function set_classes( $classes ) { |
717 | 718 | $this->classes = Helper::sanitize_classes( $classes ); |
@@ -770,7 +771,7 @@ discard block |
||
770 | 771 | * assigned to them instead. |
771 | 772 | * |
772 | 773 | * @param array $fields |
773 | - * @return object $this |
|
774 | + * @return Container $this |
|
774 | 775 | */ |
775 | 776 | public function add_fields( $fields ) { |
776 | 777 | foreach ( $fields as $field ) { |
@@ -800,7 +801,7 @@ discard block |
||
800 | 801 | * |
801 | 802 | * @param string $tab_name |
802 | 803 | * @param array $fields |
803 | - * @return object $this |
|
804 | + * @return Container $this |
|
804 | 805 | */ |
805 | 806 | public function add_tab( $tab_name, $fields ) { |
806 | 807 | $this->add_fields( $fields ); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * |
242 | 242 | * @param array<string> $condition_types |
243 | 243 | * @param Carbon_Fields\Container\Container $container |
244 | - * @return array<string> |
|
244 | + * @return string[] |
|
245 | 245 | */ |
246 | 246 | public function filter_post_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
247 | 247 | return array_merge( |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * |
256 | 256 | * @param array<string> $condition_types |
257 | 257 | * @param Carbon_Fields\Container\Container $container |
258 | - * @return array<string> |
|
258 | + * @return string[] |
|
259 | 259 | */ |
260 | 260 | public function filter_post_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
261 | 261 | return array_merge( |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | * |
270 | 270 | * @param array<string> $condition_types |
271 | 271 | * @param Carbon_Fields\Container\Container $container |
272 | - * @return array<string> |
|
272 | + * @return string[] |
|
273 | 273 | */ |
274 | 274 | public function filter_term_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
275 | 275 | return array_merge( |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * |
284 | 284 | * @param array<string> $condition_types |
285 | 285 | * @param Carbon_Fields\Container\Container $container |
286 | - * @return array<string> |
|
286 | + * @return string[] |
|
287 | 287 | */ |
288 | 288 | public function filter_term_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
289 | 289 | return array_merge( |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * |
298 | 298 | * @param array<string> $condition_types |
299 | 299 | * @param Carbon_Fields\Container\Container $container |
300 | - * @return array<string> |
|
300 | + * @return string[] |
|
301 | 301 | */ |
302 | 302 | public function filter_user_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
303 | 303 | return array_merge( |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | * |
312 | 312 | * @param array<string> $condition_types |
313 | 313 | * @param Carbon_Fields\Container\Container $container |
314 | - * @return array<string> |
|
314 | + * @return string[] |
|
315 | 315 | */ |
316 | 316 | public function filter_user_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
317 | 317 | return array_merge( |
@@ -57,6 +57,7 @@ |
||
57 | 57 | * Sanitize a title to a filename |
58 | 58 | * |
59 | 59 | * @param string $title |
60 | + * @param string $extension |
|
60 | 61 | * @return string |
61 | 62 | */ |
62 | 63 | protected function title_to_filename( $title, $extension ) { |
@@ -142,7 +142,7 @@ |
||
142 | 142 | * |
143 | 143 | * @param Datastore_Interface $datastore |
144 | 144 | * @param boolean $set_as_default |
145 | - * @return object $this |
|
145 | + * @return Complex_Field $this |
|
146 | 146 | */ |
147 | 147 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
148 | 148 | if ( $set_as_default && ! $this->has_default_datastore() ) { |