@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * The forbidden strings this sniff looks for. |
| 13 | 13 | * @var array |
| 14 | 14 | */ |
| 15 | - protected $keywords = ['And', '_and', 'Or', '_or']; |
|
| 15 | + protected $keywords = [ 'And', '_and', 'Or', '_or' ]; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Returns the token types that this sniff is interested in. |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function register() |
| 22 | 22 | { |
| 23 | - return [T_FUNCTION]; |
|
| 23 | + return [ T_FUNCTION ]; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
| 35 | 35 | { |
| 36 | 36 | $tokens = $phpcsFile->getTokens(); |
| 37 | - $functionNameToken = $tokens[$stackPtr + 2]; |
|
| 37 | + $functionNameToken = $tokens[ $stackPtr + 2 ]; |
|
| 38 | 38 | |
| 39 | - if (! $this->containsKeywords($functionNameToken)) { |
|
| 39 | + if (!$this->containsKeywords($functionNameToken)) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | protected function containsKeywords($functionNameToken) |
| 47 | 47 | { |
| 48 | - $functionName = $functionNameToken['content']; |
|
| 48 | + $functionName = $functionNameToken[ 'content' ]; |
|
| 49 | 49 | foreach ($this->keywords as $keyword) { |
| 50 | 50 | if ($this->contains($keyword, $functionName)) { |
| 51 | 51 | return true; |