| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php declare(strict_types = 1); |
||
| 27 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 28 | { |
||
| 29 | $tokens = $phpcsFile->getTokens(); |
||
| 30 | $functionName = $tokens[$stackPtr + 2]['content']; |
||
| 31 | $token = $tokens[$stackPtr]; |
||
| 32 | |||
| 33 | $start = $token['scope_opener']; |
||
| 34 | $end = $token['scope_closer']; |
||
| 35 | |||
| 36 | foreach (range($start, $end) as $index) { |
||
| 37 | if ($tokens[$index]['type'] === 'T_NEW') { |
||
| 38 | $phpcsFile->addWarning($this->getWarningMessage($functionName), $tokens[$index]['line'], __CLASS__); |
||
| 39 | } |
||
| 52 |