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

WPCS 3.0: Fix coding standards of VIPCS sniffs #733

Merged
merged 2 commits into from
Jan 25, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected function processTokenWithinScope( File $phpcsFile, $stackPtr, $currSco
return;
}
}
$i++;
++$i;
}
}

Expand Down
6 changes: 3 additions & 3 deletions WordPressVIPMinimum/Sniffs/Compatibility/ZoninatorSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public function process_token( $stackPtr ) {
/**
* Removes the quotation marks around T_CONSTANT_ENCAPSED_STRING.
*
* @param string $string T_CONSTANT_ENCAPSED_STRING containing wrapping quotation marks.
* @param string $text_string T_CONSTANT_ENCAPSED_STRING containing wrapping quotation marks.
*
* @return string String w/o wrapping quotation marks.
*/
public function remove_wrapping_quotation_marks( $string ) {
return trim( str_replace( '"', "'", $string ), "'" );
public function remove_wrapping_quotation_marks( $text_string ) {
return trim( str_replace( '"', "'", $text_string ), "'" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ private function processFunctionBody( $stackPtr ) {

while ( $returnTokenPtr ) {
if ( $this->isInsideIfConditonal( $returnTokenPtr ) ) {
$insideIfConditionalReturn++;
++$insideIfConditionalReturn;
} else {
$outsideConditionalReturn++;
++$outsideConditionalReturn;
}
if ( $this->isReturningVoid( $returnTokenPtr ) ) {
$message = 'Please, make sure that a callback to `%s` filter is returning void intentionally.';
Expand Down