@@ -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,14 +34,14 @@ discard block |
||
34 | 34 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
35 | 35 | { |
36 | 36 | $tokens = $phpcsFile->getTokens(); |
37 | - $functionNameToken = $tokens[$stackPtr + 2]; |
|
38 | - $functionName = $functionNameToken['content']; |
|
37 | + $functionNameToken = $tokens[ $stackPtr + 2 ]; |
|
38 | + $functionName = $functionNameToken[ 'content' ]; |
|
39 | 39 | |
40 | - if (! $this->containsKeywords($functionName)) { |
|
40 | + if (!$this->containsKeywords($functionName)) { |
|
41 | 41 | return; |
42 | 42 | } |
43 | 43 | |
44 | - if (! $this->ensuingDelimiter($functionName)) { |
|
44 | + if (!$this->ensuingDelimiter($functionName)) { |
|
45 | 45 | return; |
46 | 46 | } |
47 | 47 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | protected function ensuingDelimiter($string) |
74 | 74 | { |
75 | 75 | foreach ($this->keywords as $keyword) { |
76 | - if (! $this->contains($keyword, $string)) { |
|
76 | + if (!$this->contains($keyword, $string)) { |
|
77 | 77 | continue; |
78 | 78 | } |
79 | 79 |