@@ -52,7 +52,7 @@ |
||
| 52 | 52 | /** |
| 53 | 53 | * Record an event. |
| 54 | 54 | * |
| 55 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
| 55 | + * @param Jetpack_Tracks_Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
| 56 | 56 | * Properties are included directly in the pixel query string after light validation. |
| 57 | 57 | * @return mixed True on success, WP_Error on failure |
| 58 | 58 | */ |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * |
| 159 | 159 | * @param array $config Full sync configuration for this sync module. |
| 160 | 160 | * |
| 161 | - * @return array Number of items yet to be enqueued. |
|
| 161 | + * @return integer Number of items yet to be enqueued. |
|
| 162 | 162 | */ |
| 163 | 163 | public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 164 | 164 | return 1; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * |
| 170 | 170 | * @access public |
| 171 | 171 | * |
| 172 | - * @return array Full sync actions of this module. |
|
| 172 | + * @return string[] Full sync actions of this module. |
|
| 173 | 173 | */ |
| 174 | 174 | public function get_full_sync_actions() { |
| 175 | 175 | return array( 'jetpack_full_sync_constants' ); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @param string $object_type Type of the sync object. |
| 69 | 69 | * @param int $id ID of the sync object. |
| 70 | - * @return mixed Object, or false if the object is invalid. |
|
| 70 | + * @return boolean Object, or false if the object is invalid. |
|
| 71 | 71 | */ |
| 72 | 72 | public function get_object_by_id( $object_type, $id ) { |
| 73 | 73 | return false; |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | * @access protected |
| 167 | 167 | * |
| 168 | 168 | * @param array $action_names Action names we're interested in. |
| 169 | - * @param array $actions_to_count Unfiltered list of actions we want to count. |
|
| 170 | - * @return array Number of actions that we're interested in. |
|
| 169 | + * @param string[] $actions_to_count Unfiltered list of actions we want to count. |
|
| 170 | + * @return integer Number of actions that we're interested in. |
|
| 171 | 171 | */ |
| 172 | 172 | protected function count_actions( $action_names, $actions_to_count ) { |
| 173 | 173 | return count( array_intersect( $action_names, $actions_to_count ) ); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | /** |
| 267 | 267 | * Given the Module Full Sync Configuration and Status return the next chunk of items to send. |
| 268 | 268 | * |
| 269 | - * @param array $config This module Full Sync configuration. |
|
| 269 | + * @param string $config This module Full Sync configuration. |
|
| 270 | 270 | * @param array $status This module Full Sync status. |
| 271 | 271 | * @param int $chunk_size Chunk size. |
| 272 | 272 | * |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | * |
| 150 | 150 | * @access public |
| 151 | 151 | * |
| 152 | - * @return int|null |
|
| 152 | + * @return null|double |
|
| 153 | 153 | */ |
| 154 | 154 | public function get_sync_progress_percentage() { |
| 155 | 155 | if ( ! $this->is_started() || $this->is_finished() ) { |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | * |
| 412 | 412 | * @access public |
| 413 | 413 | * |
| 414 | - * @return int|null |
|
| 414 | + * @return null|double |
|
| 415 | 415 | */ |
| 416 | 416 | public function get_sync_progress_percentage() { |
| 417 | 417 | if ( ! $this->is_started() || $this->is_finished() ) { |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | * @access private |
| 626 | 626 | * |
| 627 | 627 | * @param string $name Name of the option. |
| 628 | - * @param mixed $default Default value of the option. |
|
| 628 | + * @param integer $default Default value of the option. |
|
| 629 | 629 | * @return mixed Option value. |
| 630 | 630 | */ |
| 631 | 631 | private function get_status_option( $name, $default = null ) { |
@@ -165,6 +165,9 @@ discard block |
||
| 165 | 165 | return $this->get_atomic_cloud_site_option( 'launch-status' ); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | + /** |
|
| 169 | + * @param string $option |
|
| 170 | + */ |
|
| 168 | 171 | function get_atomic_cloud_site_option( $option ) { |
| 169 | 172 | if ( ! jetpack_is_atomic_site() ) { |
| 170 | 173 | return false; |
@@ -233,6 +236,9 @@ discard block |
||
| 233 | 236 | return false; |
| 234 | 237 | } |
| 235 | 238 | |
| 239 | + /** |
|
| 240 | + * @param string $role |
|
| 241 | + */ |
|
| 236 | 242 | function current_user_can( $role ) { |
| 237 | 243 | return current_user_can( $role ); |
| 238 | 244 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | * |
| 206 | 206 | * @access public |
| 207 | 207 | * |
| 208 | - * @param \WP_User $user User object. |
|
| 208 | + * @param \WP_User|null $user User object. |
|
| 209 | 209 | * @return \WP_User Expanded user object. |
| 210 | 210 | */ |
| 211 | 211 | public function expand_user( $user ) { |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | * @access public |
| 546 | 546 | * |
| 547 | 547 | * @param int $user_id ID of the user. |
| 548 | - * @return array Current flags of the user. |
|
| 548 | + * @return string Current flags of the user. |
|
| 549 | 549 | */ |
| 550 | 550 | public function get_flags( $user_id ) { |
| 551 | 551 | if ( isset( $this->flags[ $user_id ] ) ) { |
@@ -636,7 +636,7 @@ discard block |
||
| 636 | 636 | * @todo Refactor to prepare the SQL query before executing it. |
| 637 | 637 | * |
| 638 | 638 | * @param array $config Full sync configuration for this sync module. |
| 639 | - * @return array Number of items yet to be enqueued. |
|
| 639 | + * @return integer Number of items yet to be enqueued. |
|
| 640 | 640 | */ |
| 641 | 641 | public function estimate_full_sync_actions( $config ) { |
| 642 | 642 | global $wpdb; |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | * |
| 681 | 681 | * @access public |
| 682 | 682 | * |
| 683 | - * @return array Full sync actions of this module. |
|
| 683 | + * @return string[] Full sync actions of this module. |
|
| 684 | 684 | */ |
| 685 | 685 | public function get_full_sync_actions() { |
| 686 | 686 | return array( 'jetpack_full_sync_users' ); |
@@ -119,8 +119,8 @@ |
||
| 119 | 119 | /** |
| 120 | 120 | * Determines whether tracking should be enabled. |
| 121 | 121 | * |
| 122 | - * @param Automattic\Jetpack\Terms_Of_Service $terms_of_service A Terms_Of_Service object. |
|
| 123 | - * @param Automattic\Jetpack\Status $status A Status object. |
|
| 122 | + * @param Terms_Of_Service $terms_of_service A Terms_Of_Service object. |
|
| 123 | + * @param Status $status A Status object. |
|
| 124 | 124 | * |
| 125 | 125 | * @return boolean True if tracking should be enabled, else false. |
| 126 | 126 | */ |