Completed
Pull Request — 2.x (#4569)
by Scott Kingsley
04:52
created
classes/PodsData.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2019,8 +2019,8 @@  discard block
 block discarded – undo
2019 2019
      *
2020 2020
      * @param string|array $sql The SQL to execute
2021 2021
      * @param string $error Error to throw on problems
2022
-     * @param null $results_error (optional)
2023
-     * @param null $no_results_error (optional)
2022
+     * @param string|null $results_error (optional)
2023
+     * @param string|null $no_results_error (optional)
2024 2024
      *
2025 2025
      * @return array|bool|mixed|null|void Result of the query
2026 2026
      *
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
     /**
2348 2348
      * Get the string to use in a query for matching, uses WP_Query meta_query arguments
2349 2349
      *
2350
-     * @param string|int $field Field name or array index
2350
+     * @param string $field Field name or array index
2351 2351
      * @param array|string $q Query array (meta_query) or string for matching
2352 2352
      * @param array $pod Related Pod
2353 2353
 	 * @param object $params Parameters passed from select()
Please login to merge, or discard this patch.
classes/PodsMeta.php 1 patch
Doc Comments   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -332,6 +332,9 @@  discard block
 block discarded – undo
332 332
         self::$settings = pods_api()->load_pods( array( 'type' => 'settings', 'refresh' => true ) );
333 333
     }
334 334
 
335
+    /**
336
+     * @param string $type
337
+     */
335 338
     public function register ( $type, $pod ) {
336 339
         $pod_type = $type;
337 340
 
@@ -795,7 +798,7 @@  discard block
 block discarded – undo
795 798
     }
796 799
 
797 800
     /**
798
-     * @param $type
801
+     * @param string $type
799 802
      * @param $name
800 803
      * @param $default_fields
801 804
      *
@@ -2688,7 +2691,7 @@  discard block
 block discarded – undo
2688 2691
      * @param string $meta_value
2689 2692
      * @param bool $unique
2690 2693
      *
2691
-     * @return bool|int|null
2694
+     * @return null|integer
2692 2695
      */
2693 2696
     public function add_meta ( $object_type, $_null = null, $object_id = 0, $meta_key = '', $meta_value = '', $unique = false ) {
2694 2697
         if ( pods_tableless() )
@@ -2729,7 +2732,7 @@  discard block
 block discarded – undo
2729 2732
      * @param string $meta_value
2730 2733
      * @param string $prev_value
2731 2734
      *
2732
-     * @return bool|int|null
2735
+     * @return null|integer
2733 2736
      */
2734 2737
     public function update_meta ( $object_type, $_null = null, $object_id = 0, $meta_key = '', $meta_value = '', $prev_value = '' ) {
2735 2738
         if ( pods_tableless() )
@@ -2870,6 +2873,9 @@  discard block
 block discarded – undo
2870 2873
         return $this->delete_object( 'media', $id );
2871 2874
     }
2872 2875
 
2876
+    /**
2877
+     * @param string $type
2878
+     */
2873 2879
     public function delete_object ( $type, $id, $name = null ) {
2874 2880
         if ( empty( $name ) )
2875 2881
             $name = $type;
Please login to merge, or discard this patch.
components/Helpers.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@
 block discarded – undo
359 359
      * $params['name'] string Field name
360 360
      *
361 361
      * @param array $params An associative array of parameters
362
-     * @param null $obj
362
+     * @param Pods $obj
363 363
      *
364 364
      * @return mixed Anything returned by the helper
365 365
      * @since 2.0
Please login to merge, or discard this patch.
includes/general.php 1 patch
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -310,7 +310,6 @@  discard block
 block discarded – undo
310 310
 /**
311 311
  * Determine if Deprecated Mode is enabled
312 312
  *
313
- * @param bool $include_debug Whether to include strict mode
314 313
  *
315 314
  * @return bool Whether Deprecated Mode is enabled
316 315
  *
@@ -443,6 +442,7 @@  discard block
 block discarded – undo
443 442
  * @param string $minimum_version Minimum version
444 443
  * @param string $comparison Comparison operator
445 444
  * @param string $maximum_version Maximum version
445
+ * @param string $what
446 446
  *
447 447
  * @return bool
448 448
  */
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
  * @uses get_shortcode_regex() Gets the search pattern for searching shortcodes.
907 907
  *
908 908
  * @param string $content Content to search for shortcodes
909
- * @param array $shortcodes Array of shortcodes to run
909
+ * @param string[] $shortcodes Array of shortcodes to run
910 910
  * @return string Content with shortcodes filtered out.
911 911
  */
912 912
 function pods_do_shortcode( $content, $shortcodes ) {
@@ -1446,7 +1446,7 @@  discard block
 block discarded – undo
1446 1446
  * @param string|bool $key Key for the cache
1447 1447
  * @param string $group (optional) Key for the group
1448 1448
  *
1449
- * @return bool|mixed|null|void
1449
+ * @return boolean
1450 1450
  *
1451 1451
  * @since 2.0
1452 1452
  */
@@ -1654,7 +1654,6 @@  discard block
 block discarded – undo
1654 1654
  *
1655 1655
  * @param string|array $pod The pod name or array of pod names
1656 1656
  * @param string $name The name of the Pod
1657
- * @param array $object (optional) Pod array, including any 'fields' arrays
1658 1657
  *
1659 1658
  * @return array|boolean Field data or false if unsuccessful
1660 1659
  * @since 2.1
Please login to merge, or discard this patch.
classes/PodsInit.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -935,7 +935,7 @@
 block discarded – undo
935 935
 	 * @param        $args
936 936
 	 * @param string $type
937 937
 	 *
938
-	 * @return array
938
+	 * @return string
939 939
 	 */
940 940
 	public static function object_label_fix( $args, $type = 'post_type' ) {
941 941
 
Please login to merge, or discard this patch.
classes/PodsAPI.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
      *
1560 1560
      * @param array $params An associative array of parameters
1561 1561
      * @param bool $sanitized (optional) Decides whether the params have been sanitized before being passed, will sanitize them if false.
1562
-     * @param bool|int $db (optional) Whether to save into the DB or just return Pod array.
1562
+     * @param boolean $db (optional) Whether to save into the DB or just return Pod array.
1563 1563
      *
1564 1564
      * @return int Pod ID
1565 1565
      * @since 1.7.9
@@ -3903,7 +3903,7 @@  discard block
 block discarded – undo
3903 3903
      * Save relationships
3904 3904
      *
3905 3905
      * @param int $id ID of item
3906
-     * @param int|array $related_id ID or IDs to save
3906
+     * @param int|array $related_ids ID or IDs to save
3907 3907
      * @param array $pod Pod data
3908 3908
      * @param array $field Field data
3909 3909
      */
@@ -5061,7 +5061,6 @@  discard block
 block discarded – undo
5061 5061
      * Delete an object from tableless fields
5062 5062
      *
5063 5063
      * @param int $id
5064
-     * @param string $type
5065 5064
      * @param string $name
5066 5065
      *
5067 5066
      * @return bool
@@ -5284,6 +5283,7 @@  discard block
 block discarded – undo
5284 5283
      * $params['name'] string Pod name
5285 5284
      *
5286 5285
      * @param array $params An associative array of parameters
5286
+     * @param string $type
5287 5287
      *
5288 5288
      * @return bool True if exists
5289 5289
      *
@@ -6792,7 +6792,7 @@  discard block
 block discarded – undo
6792 6792
      * @param string $type Field type to look for
6793 6793
      * @param array $options (optional) Options of the field to pass to the schema function.
6794 6794
      *
6795
-     * @return array|bool|mixed|null
6795
+     * @return string
6796 6796
      *
6797 6797
      * @since 2.0
6798 6798
      */
@@ -7228,7 +7228,7 @@  discard block
 block discarded – undo
7228 7228
 	 *
7229 7229
 	 * Load the information about an objects MySQL table
7230 7230
 	 *
7231
-	 * @param $object_type
7231
+	 * @param string $object_type
7232 7232
 	 * @param string $object The object to look for
7233 7233
 	 * @param null $name (optional) Name of the pod to load
7234 7234
 	 * @param array $pod (optional) Array with pod information
Please login to merge, or discard this patch.
classes/fields/website.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,6 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * Add options and set defaults to
52 52
 	 *
53
-	 * @param array $options
54 53
 	 *
55 54
 	 * @since 2.0
56 55
 	 */
@@ -120,7 +119,7 @@  discard block
 block discarded – undo
120 119
 	 *
121 120
 	 * @param array $options
122 121
 	 *
123
-	 * @return array
122
+	 * @return string
124 123
 	 * @since 2.0
125 124
 	 */
126 125
 	public function schema ( $options = null ) {
@@ -143,7 +142,7 @@  discard block
 block discarded – undo
143 142
 	 * @param array $pod
144 143
 	 * @param int $id
145 144
 	 *
146
-	 * @return mixed|null
145
+	 * @return string
147 146
 	 * @since 2.0
148 147
 	 */
149 148
 	public function display ( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
Please login to merge, or discard this patch.
classes/Pods.php 1 patch
Doc Comments   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	/**
331 331
 	 * Rewind Iterator
332 332
 	 *
333
-	 * @return void|boolean
333
+	 * @return null|false
334 334
 	 *
335 335
 	 * @since 2.3.4
336 336
 	 *
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	/**
382 382
 	 * Move onto the next Iterator row
383 383
 	 *
384
-	 * @return void|boolean
384
+	 * @return null|false
385 385
 	 *
386 386
 	 * @since 2.3.4
387 387
 	 *
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 	 * Return field array from a Pod, a field's data, or a field option
477 477
 	 *
478 478
 	 * @param null $field
479
-	 * @param null $option
479
+	 * @param string $option
480 480
 	 *
481 481
 	 * @return bool|mixed
482 482
 	 *
@@ -1975,7 +1975,6 @@  discard block
 block discarded – undo
1975 1975
 	 * Return the next item ID, loops at the first id to return the last
1976 1976
 	 *
1977 1977
 	 * @param int $id
1978
-	 * @param array $find_params
1979 1978
 	 *
1980 1979
 	 * @return int
1981 1980
 	 * @since 2.0
@@ -2491,7 +2490,7 @@  discard block
 block discarded – undo
2491 2490
 	 * @param null|int $offset Offset of rows
2492 2491
 	 * @param null|int $total Total rows
2493 2492
 	 *
2494
-	 * @return int Number of pages
2493
+	 * @return double Number of pages
2495 2494
 	 * @since 2.3.10
2496 2495
 	 */
2497 2496
 	public function total_pages( $limit = null, $offset = null, $total = null ) {
@@ -2600,7 +2599,7 @@  discard block
 block discarded – undo
2600 2599
 	 * @see PodsAPI::save_pod_item
2601 2600
 	 *
2602 2601
 	 * @param string $field Field name
2603
-	 * @param mixed $value ID(s) to add, int|float to add to number field, string for dates (+1 week), or string for text
2602
+	 * @param string $value ID(s) to add, int|float to add to number field, string for dates (+1 week), or string for text
2604 2603
 	 * @param int $id (optional) ID of the pod item to update
2605 2604
 	 *
2606 2605
 	 * @return int The item ID
@@ -2711,7 +2710,7 @@  discard block
 block discarded – undo
2711 2710
 	 * @see PodsAPI::save_pod_item
2712 2711
 	 *
2713 2712
 	 * @param string $field Field name
2714
-	 * @param mixed $value ID(s) to add, int|float to add to number field, string for dates (-1 week), or string for text
2713
+	 * @param string $value ID(s) to add, int|float to add to number field, string for dates (-1 week), or string for text
2715 2714
 	 * @param int $id (optional) ID of the pod item to update
2716 2715
 	 *
2717 2716
 	 * @return int The item ID
@@ -3321,7 +3320,7 @@  discard block
 block discarded – undo
3321 3320
 	 *
3322 3321
 	 * @see Pods_Templates::template
3323 3322
 	 *
3324
-	 * @param string $template The template name
3323
+	 * @param string $template_name The template name
3325 3324
 	 * @param string $code Custom template code to use instead
3326 3325
 	 * @param bool $deprecated Whether to use deprecated functionality based on old function usage
3327 3326
 	 *
@@ -3607,7 +3606,6 @@  discard block
 block discarded – undo
3607 3606
 	 * Replace magic tags with their values
3608 3607
 	 *
3609 3608
 	 * @param string $code The content to evaluate
3610
-	 * @param object $obj The Pods object
3611 3609
 	 *
3612 3610
 	 * @return string Code with Magic Tags evaluated
3613 3611
 	 *
@@ -3621,7 +3619,6 @@  discard block
 block discarded – undo
3621 3619
 	 * Replace magic tags with their values
3622 3620
 	 *
3623 3621
 	 * @param string $tag The magic tag to process
3624
-	 * @param object $obj The Pods object
3625 3622
 	 *
3626 3623
 	 * @return string Code with Magic Tags evaluated
3627 3624
 	 *
Please login to merge, or discard this patch.
components/Templates/includes/functions-view_template.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Return array of valid frontier type shortcode tags
20 20
  *
21
- * @return array
21
+ * @return string[]
22 22
  */
23 23
 function frontier_get_shortcodes() {
24 24
 	$shortcodes = array( 'each', 'pod_sub_template', 'once', 'pod_once_template', 'before', 'pod_before_template', 'after', 'pod_after_template', 'if', 'pod_if_field' );
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
  * @param array attributes from template
240 240
  * @param string template to be processed
241 241
  *
242
- * @return null
242
+ * @return string
243 243
  * @since 2.4
244 244
  */
245 245
 function frontier_do_subtemplate( $atts, $content ) {
Please login to merge, or discard this patch.