Skip to content

Commit

Permalink
Remove @return void from internal docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dlh01 committed Nov 29, 2017
1 parent ddc1b0d commit f8467b2
Show file tree
Hide file tree
Showing 52 changed files with 49 additions and 162 deletions.
2 changes: 0 additions & 2 deletions WordPress/AbstractArrayAssignmentRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ protected function setup_groups() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {

Expand Down
8 changes: 4 additions & 4 deletions WordPress/AbstractClassRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {
// Reset the temporary storage before processing the token.
Expand Down Expand Up @@ -167,8 +167,8 @@ public function is_targetted_token( $stackPtr ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function check_for_matches( $stackPtr ) {
$skip_to = array();
Expand Down
12 changes: 6 additions & 6 deletions WordPress/AbstractFunctionParameterSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function getGroups() {
* @param array $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
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_matched_token( $stackPtr, $group_name, $matched_content ) {

Expand All @@ -87,8 +87,8 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content
* @param string $matched_content The token content (function name) which was matched.
* @param array $parameters Array with information about the parameters.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
abstract public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters );

Expand All @@ -102,8 +102,8 @@ abstract public function process_parameters( $stackPtr, $group_name, $matched_co
* @param array $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
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_no_parameters( $stackPtr, $group_name, $matched_content ) {
return;
Expand Down
12 changes: 6 additions & 6 deletions WordPress/AbstractFunctionRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ protected function setup_groups( $key ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {

Expand Down Expand Up @@ -248,8 +248,8 @@ public function is_targetted_token( $stackPtr ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function check_for_matches( $stackPtr ) {
$token_content = strtolower( $this->tokens[ $stackPtr ]['content'] );
Expand Down Expand Up @@ -287,8 +287,8 @@ public function check_for_matches( $stackPtr ) {
* @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
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_matched_token( $stackPtr, $group_name, $matched_content ) {

Expand Down
4 changes: 2 additions & 2 deletions WordPress/AbstractVariableRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ protected function setup_groups() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {

Expand Down
8 changes: 4 additions & 4 deletions WordPress/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ abstract class Sniff implements PHPCS_Sniff {
* @param int $stackPtr The position of the current token
* in the stack passed in $tokens.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process( File $phpcsFile, $stackPtr ) {
$this->init( $phpcsFile );
Expand All @@ -892,8 +892,8 @@ public function process( File $phpcsFile, $stackPtr ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
abstract public function process_token( $stackPtr );

Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/Arrays/ArrayDeclarationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public function register() {
*
* @param \PHP_CodeSniffer\Files\File $phpcsFile A PHP_CodeSniffer file.
* @param int $stackPtr The position of the token.
*
* @return void
*/
public function process( File $phpcsFile, $stackPtr ) {}

Expand Down
6 changes: 0 additions & 6 deletions WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public function register() {
* be in the `processSingleLineArray()` method.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {
/*
Expand Down Expand Up @@ -176,8 +174,6 @@ public function process_token( $stackPtr ) {
* @param int $stackPtr The position of the current token in the stack.
* @param int $opener The position of the array opener.
* @param int $closer The position of the array closer.
*
* @return void
*/
protected function process_single_line_array( $stackPtr, $opener, $closer ) {
/*
Expand Down Expand Up @@ -333,8 +329,6 @@ protected function process_single_line_array( $stackPtr, $opener, $closer ) {
* @param int $stackPtr The position of the current token in the stack.
* @param int $opener The position of the array opener.
* @param int $closer The position of the array closer.
*
* @return void
*/
protected function process_multi_line_array( $stackPtr, $opener, $closer ) {
/*
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/Arrays/ArrayIndentationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public function register() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {
if ( ! isset( $this->tab_width ) ) {
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public function register() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {

Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public function register() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {
/*
Expand Down
10 changes: 4 additions & 6 deletions WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {
/*
Expand Down Expand Up @@ -207,8 +207,8 @@ public function process_token( $stackPtr ) {
* @param int $opener The position of the array opener.
* @param int $closer The position of the array closer.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
protected function process_single_line_array( $stackPtr, $items, $opener, $closer ) {
/*
Expand Down Expand Up @@ -259,8 +259,6 @@ protected function process_single_line_array( $stackPtr, $items, $opener, $close
* @param array $items Info array containing information on each array item.
* @param int $opener The position of the array opener.
* @param int $closer The position of the array closer.
*
* @return void
*/
protected function process_multi_line_array( $stackPtr, $items, $opener, $closer ) {

Expand Down
4 changes: 0 additions & 4 deletions WordPress/Sniffs/CSRF/NonceVerificationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ public function register() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {

Expand Down Expand Up @@ -168,8 +166,6 @@ public function process_token( $stackPtr ) {
* Merge custom functions provided via a custom ruleset with the defaults, if we haven't already.
*
* @since 0.11.0 Split out from the `process()` method.
*
* @return void
*/
protected function mergeFunctionLists() {
if ( $this->customNonceVerificationFunctions !== $this->addedCustomFunctions['nonce'] ) {
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/Classes/ClassInstantiationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public function register() {
* Processes this test, when one of its tokens is encountered.
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {
// Make sure we have the right token, JS vs PHP.
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public function register() {
* @since 0.14.0
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {

Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ public function register() {
* @since 0.14.0
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return void
*/
public function process_token( $stackPtr ) {

Expand Down
4 changes: 2 additions & 2 deletions WordPress/Sniffs/Files/FileNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public function register() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {

Expand Down
14 changes: 6 additions & 8 deletions WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ public function getGroups() {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
public function process_token( $stackPtr ) {
/*
Expand Down Expand Up @@ -332,8 +332,8 @@ public function process_token( $stackPtr ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
protected function process_variable_variable( $stackPtr ) {
static $indicators = array(
Expand Down Expand Up @@ -429,8 +429,8 @@ protected function process_variable_variable( $stackPtr ) {
*
* @param int $stackPtr The position of the current token in the stack.
*
* @return int|void Integer stack pointer to skip forward or void to continue
* normal file processing.
* @return int Integer stack pointer to skip forward or void to continue
* normal file processing.
*/
protected function process_variable_assignment( $stackPtr ) {

Expand Down Expand Up @@ -567,8 +567,6 @@ protected function process_variable_assignment( $stackPtr ) {
* @param array $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.
*
* @return void
*/
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {

Expand Down
4 changes: 0 additions & 4 deletions WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class ValidFunctionNameSniff extends PHPCS_PEAR_ValidFunctionNameSniff {
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed.
* @param int $stackPtr The position where this token was
* found.
*
* @return void
*/
protected function processTokenOutsideScope( File $phpcsFile, $stackPtr ) {
$functionName = $phpcsFile->getDeclarationName( $stackPtr );
Expand Down Expand Up @@ -106,8 +104,6 @@ protected function processTokenOutsideScope( File $phpcsFile, $stackPtr ) {
* @param int $stackPtr The position where this token was
* found.
* @param int $currScope The position of the current scope.
*
* @return void
*/
protected function processTokenWithinScope( File $phpcsFile, $stackPtr, $currScope ) {
$methodName = $phpcsFile->getDeclarationName( $stackPtr );
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public function getGroups() {
* @param array $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.
*
* @return void
*/
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
// Ignore deprecated hook names.
Expand Down
8 changes: 0 additions & 8 deletions WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ class ValidVariableNameSniff extends PHPCS_AbstractVariableSniff {
* @param \PHP_CodeSniffer\Files\File $phpcs_file The file being scanned.
* @param int $stack_ptr The position of the current token in the
* stack passed in $tokens.
*
* @return void
*/
protected function processVariable( File $phpcs_file, $stack_ptr ) {

Expand Down Expand Up @@ -215,8 +213,6 @@ protected function processVariable( File $phpcs_file, $stack_ptr ) {
* @param \PHP_CodeSniffer\Files\File $phpcs_file The file being scanned.
* @param int $stack_ptr The position of the current token in the
* stack passed in $tokens.
*
* @return void
*/
protected function processMemberVar( File $phpcs_file, $stack_ptr ) {

Expand Down Expand Up @@ -249,8 +245,6 @@ protected function processMemberVar( File $phpcs_file, $stack_ptr ) {
* @param \PHP_CodeSniffer\Files\File $phpcs_file The file being scanned.
* @param int $stack_ptr The position of the double quoted
* string.
*
* @return void
*/
protected function processVariableInString( File $phpcs_file, $stack_ptr ) {

Expand Down Expand Up @@ -299,8 +293,6 @@ public static function isSnakeCase( $var_name ) {
* @since 0.10.0
*
* @param \PHP_CodeSniffer\Files\File $phpcs_file The file being scanned.
*
* @return void
*/
protected function mergeWhiteList( File $phpcs_file ) {
if ( $this->customPropertiesWhitelist !== $this->addedCustomProperties['properties']
Expand Down
2 changes: 0 additions & 2 deletions WordPress/Sniffs/PHP/DiscouragedFunctionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ public function register() {
*
* @param \PHP_CodeSniffer\Files\File $phpcsFile A PHP_CodeSniffer file.
* @param int $stackPtr The position of the token.
*
* @return void
*/
public function process( File $phpcsFile, $stackPtr ) {}

Expand Down
Loading

0 comments on commit f8467b2

Please sign in to comment.