@@ -220,6 +220,9 @@ discard block |
||
220 | 220 | <?php |
221 | 221 | } |
222 | 222 | |
223 | + /** |
|
224 | + * @param string $option |
|
225 | + */ |
|
223 | 226 | function admin_likes_get_option( $option ) { |
224 | 227 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
225 | 228 | $option_setting = get_blog_option( get_current_blog_id(), $option, 'on' ); |
@@ -437,6 +440,9 @@ discard block |
||
437 | 440 | return $columns; |
438 | 441 | } |
439 | 442 | |
443 | + /** |
|
444 | + * @param string $content |
|
445 | + */ |
|
440 | 446 | function post_likes( $content ) { |
441 | 447 | $post_id = get_the_ID(); |
442 | 448 |
@@ -388,6 +388,9 @@ discard block |
||
388 | 388 | do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) ); |
389 | 389 | } |
390 | 390 | |
391 | + /** |
|
392 | + * @param string $name |
|
393 | + */ |
|
391 | 394 | public function js_dialog( $name, $params = array() ) { |
392 | 395 | if ( true !== $this->open_link_in_new ) { |
393 | 396 | return; |
@@ -1039,6 +1042,9 @@ discard block |
||
1039 | 1042 | public $icon = '\f204'; |
1040 | 1043 | private $share_type = 'default'; |
1041 | 1044 | |
1045 | + /** |
|
1046 | + * @param string $id |
|
1047 | + */ |
|
1042 | 1048 | public function __construct( $id, array $settings ) { |
1043 | 1049 | parent::__construct( $id, $settings ); |
1044 | 1050 | |
@@ -1186,6 +1192,10 @@ discard block |
||
1186 | 1192 | class Share_Print extends Sharing_Source { |
1187 | 1193 | public $shortname = 'print'; |
1188 | 1194 | public $icon = '\f469'; |
1195 | + |
|
1196 | + /** |
|
1197 | + * @param string $id |
|
1198 | + */ |
|
1189 | 1199 | public function __construct( $id, array $settings ) { |
1190 | 1200 | parent::__construct( $id, $settings ); |
1191 | 1201 | |
@@ -1585,6 +1595,9 @@ discard block |
||
1585 | 1595 | return __( 'Pinterest', 'jetpack' ); |
1586 | 1596 | } |
1587 | 1597 | |
1598 | + /** |
|
1599 | + * @return string |
|
1600 | + */ |
|
1588 | 1601 | public function get_image( $post ) { |
1589 | 1602 | if ( class_exists( 'Jetpack_PostImages' ) ) { |
1590 | 1603 | $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); |
@@ -1724,6 +1737,9 @@ discard block |
||
1724 | 1737 | public $shortname = 'pocket'; |
1725 | 1738 | public $icon = '\f224'; |
1726 | 1739 | |
1740 | + /** |
|
1741 | + * @param string $id |
|
1742 | + */ |
|
1727 | 1743 | public function __construct( $id, array $settings ) { |
1728 | 1744 | parent::__construct( $id, $settings ); |
1729 | 1745 | |
@@ -1839,6 +1855,9 @@ discard block |
||
1839 | 1855 | class Jetpack_Share_WhatsApp extends Sharing_Source { |
1840 | 1856 | public $shortname = 'jetpack-whatsapp'; |
1841 | 1857 | |
1858 | + /** |
|
1859 | + * @param string $id |
|
1860 | + */ |
|
1842 | 1861 | public function __construct( $id, array $settings ) { |
1843 | 1862 | parent::__construct( $id, $settings ); |
1844 | 1863 | } |
@@ -382,7 +382,7 @@ |
||
382 | 382 | * |
383 | 383 | * @param array $query_args The query args of the URL. |
384 | 384 | * |
385 | - * @return array The width and height of the shortcode. |
|
385 | + * @return integer[] The width and height of the shortcode. |
|
386 | 386 | */ |
387 | 387 | function jetpack_shortcode_youtube_dimensions( $query_args ) { |
388 | 388 | global $content_width; |
@@ -263,7 +263,7 @@ |
||
263 | 263 | * @param DOMElement $parent (optional) an element to which new children should be added. |
264 | 264 | * @param DOMDocument $root (optional) the parent document. |
265 | 265 | * |
266 | - * @return string|DOMDocument The rendered XML string or an object if root element is specified. |
|
266 | + * @return null|DOMNode The rendered XML string or an object if root element is specified. |
|
267 | 267 | */ |
268 | 268 | protected function array_to_xml_string( $array, $parent = null, $root = null ) { |
269 | 269 | $return_string = false; |
@@ -177,10 +177,10 @@ |
||
177 | 177 | * @since 4.3.0 |
178 | 178 | * @since 4.6.0 Added public-api.wordpress.com as an allowed redirect |
179 | 179 | * |
180 | - * @param array $hosts |
|
180 | + * @param string[] $hosts |
|
181 | 181 | * @param string $api_base |
182 | 182 | * |
183 | - * @return array |
|
183 | + * @return string[] |
|
184 | 184 | */ |
185 | 185 | static function allowed_redirect_hosts( $hosts, $api_base = JETPACK__API_BASE ) { |
186 | 186 | if ( empty( $hosts ) ) { |
@@ -308,7 +308,7 @@ |
||
308 | 308 | * |
309 | 309 | * @since 4.4 |
310 | 310 | * @param string $title |
311 | - * @return int|WP_Error |
|
311 | + * @return string |
|
312 | 312 | */ |
313 | 313 | function videopress_create_new_media_item( $title, $guid = null ) { |
314 | 314 | $post = array( |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @param object $attachment The attachment object. |
105 | 105 | * |
106 | - * @return false|int |
|
106 | + * @return boolean |
|
107 | 107 | */ |
108 | 108 | public function is_video( $attachment ) { |
109 | 109 | return isset( $attachment->post_mime_type ) && wp_startswith( $attachment->post_mime_type, 'video/' ); |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | * Removes the jetpack_videopress field from the response if the |
114 | 114 | * given attachment is not a video. |
115 | 115 | * |
116 | - * @param WP_REST_Response $response Response from the attachment endpoint. |
|
117 | - * @param WP_Post $attachment The original attachment object. |
|
116 | + * @param stdClass $response Response from the attachment endpoint. |
|
117 | + * @param stdClass $attachment The original attachment object. |
|
118 | 118 | * |
119 | 119 | * @return mixed |
120 | 120 | */ |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param mixed $object Response from the attachment endpoint. |
147 | 147 | * @param WP_REST_Request $request Request to the attachment endpoint. |
148 | 148 | * |
149 | - * @return true |
|
149 | + * @return boolean |
|
150 | 150 | */ |
151 | 151 | public function get_permission_check( $object, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
152 | 152 | return true; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * @param WP_Post $object The attachment object. |
161 | 161 | * @param WP_REST_Request $request Request to the attachment endpoint. |
162 | 162 | * |
163 | - * @return true |
|
163 | + * @return boolean |
|
164 | 164 | */ |
165 | 165 | public function update_permission_check( $value, $object, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
166 | 166 | return true; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * |
101 | 101 | * @param string $class_name The name of the class to autoload. |
102 | 102 | * |
103 | - * @return bool Indicates whether or not a class file was loaded. |
|
103 | + * @return null|boolean Indicates whether or not a class file was loaded. |
|
104 | 104 | */ |
105 | 105 | public static function load_class( $class_name ) { |
106 | 106 | global $jetpack_autoloader_loader; |
@@ -186,7 +186,7 @@ |
||
186 | 186 | * Sign a string with a given key and algorithm. |
187 | 187 | * |
188 | 188 | * @param string $msg The message to sign. |
189 | - * @param string|resource $key The secret key. |
|
189 | + * @param string $key The secret key. |
|
190 | 190 | * @param string $alg The signing algorithm. |
191 | 191 | * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'. |
192 | 192 | * |