@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | /** |
50 | 50 | * record_event |
51 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
51 | + * @param Jetpack_Tracks_Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
52 | 52 | * Properties are included directly in the pixel query string after light validation. |
53 | 53 | * @return mixed True on success, WP_Error on failure |
54 | 54 | */ |
@@ -71,6 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | /** |
73 | 73 | * Synchronously request the pixel |
74 | + * @param string $pixel |
|
74 | 75 | */ |
75 | 76 | static function record_pixel( $pixel ) { |
76 | 77 | // Add the Request Timestamp and URL terminator just before the HTTP request. |
@@ -95,6 +95,9 @@ |
||
95 | 95 | return (array) $upgrader->skin->get_upgrade_messages(); |
96 | 96 | } |
97 | 97 | |
98 | + /** |
|
99 | + * @param string $plugin_slug |
|
100 | + */ |
|
98 | 101 | protected static function generate_wordpress_org_plugin_download_link( $plugin_slug ) { |
99 | 102 | return "https://downloads.wordpress.org/plugin/$plugin_slug.latest-stable.zip"; |
100 | 103 | } |
@@ -171,6 +171,9 @@ |
||
171 | 171 | update_option( 'jetpack_plugin_api_action_links', $plugins_action_links ); |
172 | 172 | } |
173 | 173 | |
174 | + /** |
|
175 | + * @param integer $checksum |
|
176 | + */ |
|
174 | 177 | public function should_send_callable( $callable_checksums, $name, $checksum ) { |
175 | 178 | $idc_override_callables = array( |
176 | 179 | 'main_network_site', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * Is the user the connection owner. |
107 | 107 | * |
108 | 108 | * @param Integer $user_id the user identifier. |
109 | - * @return Boolean is the user the connection owner? |
|
109 | + * @return integer is the user the connection owner? |
|
110 | 110 | */ |
111 | 111 | public function is_connection_owner( $user_id ) { |
112 | 112 | return $user_id; |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | * |
571 | 571 | * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. |
572 | 572 | * @param string|false $token_key If provided, check that the token matches the provided input. |
573 | - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
573 | + * @param boolean $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
574 | 574 | * |
575 | 575 | * @return object|false |
576 | 576 | */ |
@@ -99,6 +99,9 @@ |
||
99 | 99 | return $user; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param \WP_User|null $user |
|
104 | + */ |
|
102 | 105 | public function expand_user( $user ) { |
103 | 106 | if ( ! is_object( $user ) ) { |
104 | 107 | return null; |
@@ -115,7 +115,7 @@ |
||
115 | 115 | * Mock a global function and make it return a certain value. |
116 | 116 | * |
117 | 117 | * @param string $function_name Name of the function. |
118 | - * @param mixed $return_value Return value of the function. |
|
118 | + * @param integer $return_value Return value of the function. |
|
119 | 119 | * @return phpmock\Mock The mock object. |
120 | 120 | */ |
121 | 121 | protected function mock_function( $function_name, $return_value = null ) { |
@@ -194,6 +194,9 @@ discard block |
||
194 | 194 | do_action( 'jetpack_full_sync_end', '', $range ); |
195 | 195 | } |
196 | 196 | |
197 | + /** |
|
198 | + * @param string $type |
|
199 | + */ |
|
197 | 200 | function get_range( $type ) { |
198 | 201 | global $wpdb; |
199 | 202 | if ( ! in_array( $type, array( 'comments', 'posts' ) ) ) { |
@@ -404,6 +407,9 @@ discard block |
||
404 | 407 | $listener->get_full_sync_queue()->reset(); |
405 | 408 | } |
406 | 409 | |
410 | + /** |
|
411 | + * @param integer $default |
|
412 | + */ |
|
407 | 413 | private function get_status_option( $name, $default = null ) { |
408 | 414 | $value = \Jetpack_Options::get_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $default ); |
409 | 415 |
@@ -447,6 +447,10 @@ discard block |
||
447 | 447 | } |
448 | 448 | |
449 | 449 | // functions |
450 | + |
|
451 | + /** |
|
452 | + * @param string $name |
|
453 | + */ |
|
450 | 454 | public function get_callable( $name ) { |
451 | 455 | $value = get_option( 'jetpack_' . $name ); |
452 | 456 | |
@@ -738,6 +742,9 @@ discard block |
||
738 | 742 | return $histogram; |
739 | 743 | } |
740 | 744 | |
745 | + /** |
|
746 | + * @param string|null $id_column |
|
747 | + */ |
|
741 | 748 | private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null, $strip_non_ascii = true, $salt = '' ) { |
742 | 749 | global $wpdb; |
743 | 750 | |
@@ -791,6 +798,9 @@ discard block |
||
791 | 798 | return 'sum'; |
792 | 799 | } |
793 | 800 | |
801 | + /** |
|
802 | + * @param string $where_sql |
|
803 | + */ |
|
794 | 804 | private function meta_count( $table, $where_sql, $min_id, $max_id ) { |
795 | 805 | global $wpdb; |
796 | 806 |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * @param string $vendorPath Path to the vendor directory. |
161 | 161 | * @param string $basePath Base Path. |
162 | 162 | * |
163 | - * @return array $classMap |
|
163 | + * @return string $classMap |
|
164 | 164 | */ |
165 | 165 | private function getClassMap( array $autoloads, Filesystem $filesystem, $vendorPath, $basePath ) { |
166 | 166 | $blacklist = null; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | /** |
225 | 225 | * Generate the PHP that will be used in the autoload_classmap_package.php files. |
226 | 226 | * |
227 | - * @param srting $classMap class map array string that is to be written out to the file. |
|
227 | + * @param string $classMap class map array string that is to be written out to the file. |
|
228 | 228 | * |
229 | 229 | * @return string |
230 | 230 | */ |