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 doc fixes #1784

Merged
merged 1 commit into from
Jul 29, 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
6 changes: 3 additions & 3 deletions WordPress/AbstractFunctionParameterSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getGroups() {
* Process a matched token.
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
*
* @return int|void Integer stack pointer to skip forward or void to continue
Expand All @@ -83,7 +83,7 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content
* This method has to be made concrete in child classes.
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand All @@ -99,7 +99,7 @@ abstract public function process_parameters( $stackPtr, $group_name, $matched_co
* were parameters are expected, but none found.
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
*
* @return int|void Integer stack pointer to skip forward or void to continue
Expand Down
3 changes: 2 additions & 1 deletion WordPress/Sniffs/Arrays/ArrayIndentationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {
if ( ! isset( $this->tab_width ) ) {
Expand Down
3 changes: 2 additions & 1 deletion WordPress/Sniffs/CodeAnalysis/EmptyStatementSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int Integer stack pointer to skip the rest of the file.
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class EscapedNotTranslatedSniff extends AbstractFunctionParameterSniff {
* @since 2.2.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
3 changes: 2 additions & 1 deletion WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ protected function process_variable_assignment( $stackPtr ) {
* @since 0.12.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getGroups() {
* @since 0.11.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/PHP/IniSetSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class IniSetSniff extends AbstractFunctionParameterSniff {
* @since 2.1.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PregQuoteDelimiterSniff extends AbstractFunctionParameterSniff {
* @since 1.0.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/PHP/StrictInArraySniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class StrictInArraySniff extends AbstractFunctionParameterSniff {
* @since 0.11.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/Security/PluginMenuSlugSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PluginMenuSlugSniff extends AbstractFunctionParameterSniff {
* @since 0.11.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
7 changes: 4 additions & 3 deletions WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function process_token( $stackPtr ) {
* @since 1.2.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down Expand Up @@ -462,7 +462,7 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p
* @since 1.2.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
*
* @return void
Expand Down Expand Up @@ -532,7 +532,8 @@ public function process_no_parameters( $stackPtr, $group_name, $matched_content
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_comments( $stackPtr ) {
if ( true === $this->header_found && ! defined( 'PHP_CODESNIFFER_IN_TESTS' ) ) {
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Sniffs/WP/DeprecatedClassesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function getGroups() {
* Process a matched token.
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched. Will
* always be 'deprecated_functions'.
* @param string $group_name The name of the group which was matched. Will
* always be 'deprecated_classes'.
* @param string $matched_content The token content (class name) which was matched.
*
* @return void
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ public function getGroups() {
* Process a matched token.
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched. Will
* @param string $group_name The name of the group which was matched. Will
* always be 'deprecated_functions'.
* @param string $matched_content The token content (function name) which was matched.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class DeprecatedParameterValuesSniff extends AbstractFunctionParameterSniff {
* @since 1.0.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DeprecatedParametersSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
* @since 0.12.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/DiscouragedConstantsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function process_arbitrary_tstring( $stackPtr ) {
* @since 0.14.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function register() {
* @since 1.0.0
*
* @param int $stackPtr The position of the current token in the stack.
* @param array $group_name The name of the group which was matched.
* @param string $group_name The name of the group which was matched.
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GlobalVariablesOverrideSniff extends Sniff {

/**
* Whether to treat all files as if they were included from
* a within function.
* within a function.
*
* This is mostly useful for projects containing views which are being
* included from within a function in another file, like themes.
Expand Down
4 changes: 3 additions & 1 deletion WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use PHP_CodeSniffer\Util\Tokens;

/**
* Ensure cast statements don't contain whitespace, but *are* surrounded by whitespace, based upon Squiz code.
* Ensure cast statements are preceded by whitespace.
*
* @link https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#space-usage
*
Expand All @@ -24,6 +24,8 @@
* @since 0.11.0 The error level for all errors thrown by this sniff has been raised from warning to error.
* @since 0.12.0 This class now extends the WordPressCS native `Sniff` class.
* @since 0.13.0 Class name changed: this class is now namespaced.
* @since 1.2.0 Removed the `NoSpaceAfterCloseParenthesis` error code in favour of the
* upstream `Generic.Formatting.SpaceAfterCast.NoSpace` error.
* @since 2.2.0 Added exception for whitespace between spread operator and cast.
*/
class CastStructureSpacingSniff extends Sniff {
Expand Down