| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 34 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 35 | { |
||
| 36 | $tokens = $phpcsFile->getTokens(); |
||
| 37 | |||
| 38 | $token = $tokens[$stackPtr]; |
||
| 39 | $openParenIndex = $token['parenthesis_opener']; |
||
| 40 | $closedParenIndex = $token['parenthesis_closer']; |
||
| 41 | |||
| 42 | for ($index=$openParenIndex+1; $index <= $closedParenIndex; $index++) { |
||
| 43 | if (in_array($tokens[$index]['type'], $this->booleans)) { |
||
| 44 | $phpcsFile->addError("Function/method contains a flag parameter.", $stackPtr, __CLASS__); |
||
| 45 | continue; |
||
| 46 | } |
||
| 50 |