Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various minor documentation fixes #1831

Merged
merged 1 commit into from Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion WordPress/AbstractFunctionParameterSniff.php
Expand Up @@ -40,7 +40,7 @@ abstract class AbstractFunctionParameterSniff extends AbstractFunctionRestrictio
protected $target_functions = array();

/**
* Groups of function to restrict.
* Groups of functions to restrict.
*
* @return array
*/
Expand Down
58 changes: 29 additions & 29 deletions WordPress/Sniff.php
Expand Up @@ -954,14 +954,14 @@ public function strip_quotes( $string ) {
*
* @since 0.11.0
*
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @return bool
*/
protected function addMessage( $message, $stackPtr, $is_error = true, $code = 'Found', $data = array(), $severity = 0 ) {
Expand All @@ -973,14 +973,14 @@ protected function addMessage( $message, $stackPtr, $is_error = true, $code = 'F
*
* @since 0.11.0
*
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @return bool
*/
protected function addFixableMessage( $message, $stackPtr, $is_error = true, $code = 'Found', $data = array(), $severity = 0 ) {
Expand All @@ -992,15 +992,15 @@ protected function addFixableMessage( $message, $stackPtr, $is_error = true, $co
*
* @since 0.11.0
*
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @param bool $fixable Optional. Whether this is a fixable error. Defaults to false.
* @param string $message The message.
* @param int $stackPtr The position of the token the message relates to.
* @param bool $is_error Optional. Whether to report the message as an 'error' or 'warning'.
* Defaults to true (error).
* @param string $code Optional error code for the message. Defaults to 'Found'.
* @param array $data Optional input for the data replacements.
* @param int $severity Optional. Severity level. Defaults to 0 which will translate to
* the PHPCS default severity level.
* @param bool $fixable Optional. Whether this is a fixable error. Defaults to false.
* @return bool
*/
private function throwMessage( $message, $stackPtr, $is_error = true, $code = 'Found', $data = array(), $severity = 0, $fixable = false ) {
Expand Down Expand Up @@ -2931,7 +2931,7 @@ public function get_declared_namespace_name( $stackPtr ) {
*
* @since 0.14.0
*
* @param int $stackPtr The position in the stack of the T_CONST token to verify.
* @param int $stackPtr The position in the stack of the T_CONST token to verify.
*
* @return bool
*/
Expand All @@ -2955,7 +2955,7 @@ public function is_class_constant( $stackPtr ) {
*
* @since 0.14.0
*
* @param int $stackPtr The position in the stack of the T_VARIABLE token to verify.
* @param int $stackPtr The position in the stack of the T_VARIABLE token to verify.
*
* @return bool
*/
Expand Down Expand Up @@ -3044,8 +3044,8 @@ protected function valid_direct_scope( $stackPtr, array $valid_scopes ) {
*
* {@internal This method should probably be refactored.}}
*
* @param int $stackPtr The index of the $wpdb variable.
* @param array $target_methods Array of methods. Key(s) should be method name.
* @param int $stackPtr The index of the $wpdb variable.
* @param array $target_methods Array of methods. Key(s) should be method name.
*
* @return bool Whether this is a $wpdb method call.
*/
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php
Expand Up @@ -65,7 +65,7 @@ class ValidHookNameSniff extends AbstractFunctionParameterSniff {
protected $punctuation_regex = '`[^\w%s]`';

/**
* Groups of function to restrict.
* Groups of functions to restrict.
*
* @since 0.11.0
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/Security/EscapeOutputSniff.php
Expand Up @@ -125,7 +125,7 @@ class EscapeOutputSniff extends Sniff {
);

/**
* List of tokens which can be considered as a safe when directly part of the output.
* List of tokens which can be considered as safe when directly part of the output.
*
* @since 0.12.0
*
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Sniffs/WP/I18nSniff.php
Expand Up @@ -633,8 +633,8 @@ protected function check_text( $context ) {
/**
* Check for the presence of a translators comment if one of the text strings contains a placeholder.
*
* @param int $stack_ptr The position of the gettext call token in the stack.
* @param array $args The function arguments.
* @param int $stack_ptr The position of the gettext call token in the stack.
* @param array $args The function arguments.
* @return void
*/
protected function check_for_translator_comment( $stack_ptr, $args ) {
Expand Down