@@ -205,8 +205,7 @@ discard block  | 
                                                    ||
| 205 | 205 | /**  | 
                                                        
| 206 | 206 | * Mock a set of constants.  | 
                                                        
| 207 | 207 | *  | 
                                                        
| 208 | - * @param array $args Array of sets with constants and their respective values.  | 
                                                        |
| 209 | - * @return phpmock\Mock The mock object.  | 
                                                        |
| 208 | + * @return phpmock\Mock[] The mock object.  | 
                                                        |
| 210 | 209 | */  | 
                                                        
| 211 | 210 |  	protected function mock_constants( $constants = array() ) { | 
                                                        
| 212 | 211 |  		$prepare_constant = function( $constant ) { | 
                                                        
@@ -222,7 +221,7 @@ discard block  | 
                                                    ||
| 222 | 221 | /**  | 
                                                        
| 223 | 222 | * Mock $wpdb->get_var() and make it return a certain value.  | 
                                                        
| 224 | 223 | *  | 
                                                        
| 225 | - * @param mixed $return_value Return value of the function.  | 
                                                        |
| 224 | + * @param integer $return_value Return value of the function.  | 
                                                        |
| 226 | 225 | * @return PHPUnit\Framework\MockObject\MockObject The mock object.  | 
                                                        
| 227 | 226 | */  | 
                                                        
| 228 | 227 |  	protected function mock_wpdb_get_var( $return_value = null ) { | 
                                                        
@@ -8,6 +8,9 @@  | 
                                                    ||
| 8 | 8 | * - wp-content/rest-api-plugins/jetpack-endpoints/  | 
                                                        
| 9 | 9 | */  | 
                                                        
| 10 | 10 | |
| 11 | +/**  | 
                                                        |
| 12 | + * @param string $file_pattern  | 
                                                        |
| 13 | + */  | 
                                                        |
| 11 | 14 |  function wpcom_rest_api_v2_load_plugin_files( $file_pattern ) { | 
                                                        
| 12 | 15 | $plugins = glob( dirname( __FILE__ ) . '/' . $file_pattern );  | 
                                                        
| 13 | 16 | |
@@ -181,7 +181,7 @@ discard block  | 
                                                    ||
| 181 | 181 | /**  | 
                                                        
| 182 | 182 | * Return a hosting provider using a set of known constants.  | 
                                                        
| 183 | 183 | *  | 
                                                        
| 184 | - * @return mixed A host identifier string or false.  | 
                                                        |
| 184 | + * @return string|false A host identifier string or false.  | 
                                                        |
| 185 | 185 | */  | 
                                                        
| 186 | 186 |  	public function get_hosting_provider_by_known_constant() { | 
                                                        
| 187 | 187 | $hosting_provider_constants = array(  | 
                                                        
@@ -209,7 +209,7 @@ discard block  | 
                                                    ||
| 209 | 209 | /**  | 
                                                        
| 210 | 210 | * Return a hosting provider using a set of known classes.  | 
                                                        
| 211 | 211 | *  | 
                                                        
| 212 | - * @return mixed A host identifier string or false.  | 
                                                        |
| 212 | + * @return string|false A host identifier string or false.  | 
                                                        |
| 213 | 213 | */  | 
                                                        
| 214 | 214 |  	public function get_hosting_provider_by_known_class() { | 
                                                        
| 215 | 215 | $hosting_provider = false;  | 
                                                        
@@ -226,7 +226,7 @@ discard block  | 
                                                    ||
| 226 | 226 | /**  | 
                                                        
| 227 | 227 | * Return a hosting provider using a set of known functions.  | 
                                                        
| 228 | 228 | *  | 
                                                        
| 229 | - * @return mixed A host identifier string or false.  | 
                                                        |
| 229 | + * @return string|false A host identifier string or false.  | 
                                                        |
| 230 | 230 | */  | 
                                                        
| 231 | 231 |  	public function get_hosting_provider_by_known_function() { | 
                                                        
| 232 | 232 | $hosting_provider = false;  | 
                                                        
@@ -441,7 +441,7 @@ discard block  | 
                                                    ||
| 441 | 441 | *  | 
                                                        
| 442 | 442 | * @param string $option Option value from the site.  | 
                                                        
| 443 | 443 | * @param callable $url_function Function retrieving the URL to normalize.  | 
                                                        
| 444 | - * @return mixed|string URL.  | 
                                                        |
| 444 | + * @return callable URL.  | 
                                                        |
| 445 | 445 | */  | 
                                                        
| 446 | 446 |  	public static function normalize_www_in_url( $option, $url_function ) { | 
                                                        
| 447 | 447 | $url = wp_parse_url( call_user_func( $url_function ) );  | 
                                                        
@@ -157,7 +157,7 @@ discard block  | 
                                                    ||
| 157 | 157 | * Prevent adding items to the queue if it hasn't sent an item for 15 mins  | 
                                                        
| 158 | 158 | * AND the queue is over 1000 items long (by default).  | 
                                                        
| 159 | 159 | *  | 
                                                        
| 160 | - * @param object $queue Sync queue.  | 
                                                        |
| 160 | + * @param string $queue Sync queue.  | 
                                                        |
| 161 | 161 | * @return bool  | 
                                                        
| 162 | 162 | */  | 
                                                        
| 163 | 163 |  	public function can_add_to_queue( $queue ) { | 
                                                        
@@ -360,7 +360,7 @@ discard block  | 
                                                    ||
| 360 | 360 | * Sync Data Loss Handler  | 
                                                        
| 361 | 361 | *  | 
                                                        
| 362 | 362 | * @param Queue $queue Sync queue.  | 
                                                        
| 363 | - * @return boolean was send successful  | 
                                                        |
| 363 | + * @return null|Items was send successful  | 
                                                        |
| 364 | 364 | */  | 
                                                        
| 365 | 365 |  	public function sync_data_loss( $queue ) { | 
                                                        
| 366 | 366 |  		if ( ! Settings::is_sync_enabled() ) { |