Skip to content

Commit

Permalink
Removed unused variable (ref #2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Oct 30, 2020
1 parent 8a89dfa commit a2ec4de
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class FunctionCommentSniff implements Sniff

/**
* Disable the check for functions with a lower visibility than the value given.
* Allowed values are public, protected and private.
*
* Allowed values are public, protected, and private.
*
* @var string
*/
Expand Down Expand Up @@ -48,11 +49,6 @@ public function register()
*/
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();

$ignore = Tokens::$emptyTokens;
$ignore[] = T_STATIC;

$scopeModifier = $phpcsFile->getMethodProperties($stackPtr)['scope'];
if ($scopeModifier === 'protected'
&& $this->minimumVisibility === 'public'
Expand All @@ -62,6 +58,7 @@ public function process(File $phpcsFile, $stackPtr)
return;
}

$tokens = $phpcsFile->getTokens();
$ignore = Tokens::$methodPrefixes;
$ignore[] = T_WHITESPACE;

Expand Down

0 comments on commit a2ec4de

Please sign in to comment.