Completed
Pull Request — add/phpcs-rules-from-MediaWiki (#17419)
by
unknown
74:39 queued 65:25
created
_inc/lib/core-api/load-wpcom-endpoints.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
 	exit;
16 16
 }
17 17
 
18
+/**
19
+ * @param string $file_pattern
20
+ */
18 21
 function wpcom_rest_api_v2_load_plugin_files( $file_pattern ) {
19 22
 	$plugins = glob( __DIR__ . '/' . $file_pattern );
20 23
 
Please login to merge, or discard this patch.
_inc/lib/markdown/extra.php 1 patch
Doc Comments   +27 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
  *
66 66
  * @since 5.9
67 67
  *
68
- * @return string Length of the multibyte string
68
+ * @return integer Length of the multibyte string
69 69
  *
70 70
  */
71 71
 function jetpack_utf8_strlen( $text ) {
@@ -160,6 +160,9 @@  discard block
 block discarded – undo
160 160
 		$this->html_hashes = array();
161 161
 	}
162 162
 
163
+	/**
164
+	 * @param string $text
165
+	 */
163 166
 	function transform($text) {
164 167
 	#
165 168
 	# Main function. Performs some preprocessing on the input text
@@ -882,6 +885,10 @@  discard block
 block discarded – undo
882 885
 
883 886
 	public $list_level = 0;
884 887
 
888
+	/**
889
+	 * @param string $list_str
890
+	 * @param string $marker_any_re
891
+	 */
885 892
 	function processListItems($list_str, $marker_any_re) {
886 893
 	#
887 894
 	#	Process the contents of a single ordered or unordered list, splitting it
@@ -983,6 +990,9 @@  discard block
 block discarded – undo
983 990
 		return "\n\n".$this->hashBlock($codeblock)."\n\n";
984 991
 	}
985 992
 
993
+	/**
994
+	 * @param string $code
995
+	 */
986 996
 	function makeCodeSpan($code) {
987 997
 	#
988 998
 	# Create a code span markup for $code. Called from handleSpanToken.
@@ -1464,6 +1474,9 @@  discard block
 block discarded – undo
1464 1474
 	# hanlde UTF-8 if the default function does not exist.
1465 1475
 	public $utf8_strlen = 'mb_strlen';
1466 1476
 
1477
+	/**
1478
+	 * @param string $text
1479
+	 */
1467 1480
 	function detab($text) {
1468 1481
 	#
1469 1482
 	# Replace tabs with the appropriate amount of space.
@@ -1998,6 +2011,12 @@  discard block
 block discarded – undo
1998 2011
 
1999 2012
 		return array($parsed, $text);
2000 2013
 	}
2014
+
2015
+	/**
2016
+	 * @param string $text
2017
+	 * @param string $hash_method
2018
+	 * @param boolean $md_attr
2019
+	 */
2001 2020
 	function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) {
2002 2021
 	#
2003 2022
 	# Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags.
@@ -2654,6 +2673,9 @@  discard block
 block discarded – undo
2654 2673
 		return $this->hashBlock($result) . "\n\n";
2655 2674
 	}
2656 2675
 
2676
+	/**
2677
+	 * @return string
2678
+	 */
2657 2679
 	function processDefListItems($list_str) {
2658 2680
 	#
2659 2681
 	#	Process the contents of a single definition list, splitting it
@@ -2764,6 +2786,10 @@  discard block
 block discarded – undo
2764 2786
 
2765 2787
 		return $text;
2766 2788
 	}
2789
+
2790
+	/**
2791
+	 * @param string[] $matches
2792
+	 */
2767 2793
 	function _doFencedCodeBlocks_callback($matches) {
2768 2794
 		$classname =& $matches[2];
2769 2795
 		$attrs     =& $matches[3];
Please login to merge, or discard this patch.
json-endpoints/class.wpcom-json-api-site-settings-v1-2-endpoint.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@
 block discarded – undo
131 131
 		return parent::callback( $path, $blog_id );
132 132
 	}
133 133
 
134
+	/**
135
+	 * @param string $key
136
+	 */
134 137
 	protected function get_locale( $key ) {
135 138
 		if ( 'locale' == $key ) {
136 139
 			if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
Please login to merge, or discard this patch.
json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -303,6 +303,9 @@
 block discarded – undo
303 303
 		return true;
304 304
 	}
305 305
 
306
+	/**
307
+	 * @param string $plugin
308
+	 */
306 309
 	protected function validate_plugin( $plugin ) {
307 310
 		if ( ! isset( $plugin) || empty( $plugin ) ) {
308 311
 			return new WP_Error( 'missing_plugin', __( 'You are required to specify a plugin to activate.', 'jetpack' ), 400 );
Please login to merge, or discard this patch.
sal/class.json-api-site-jetpack-base.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -2,10 +2,20 @@  discard block
 block discarded – undo
2 2
 require_once __DIR__ . '/class.json-api-site-base.php';
3 3
 
4 4
 abstract class Abstract_Jetpack_Site extends SAL_Site {
5
+
6
+	/**
7
+	 * @param string $name
8
+	 */
5 9
 	abstract protected function get_constant( $name );
6 10
 
11
+	/**
12
+	 * @param string $feature_name
13
+	 */
7 14
 	abstract protected function current_theme_supports( $feature_name );
8 15
 
16
+	/**
17
+	 * @param string $feature_name
18
+	 */
9 19
 	abstract protected function get_theme_support( $feature_name );
10 20
 
11 21
 	abstract protected function get_mock_option( $name );
@@ -14,6 +24,9 @@  discard block
 block discarded – undo
14 24
 
15 25
 	abstract public function get_updates();
16 26
 
27
+	/**
28
+	 * @return string
29
+	 */
17 30
 	abstract protected function main_network_site();
18 31
 
19 32
 	abstract protected function wp_version();
Please login to merge, or discard this patch.