| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php declare(strict_types = 1); |
||
| 8 | class NewInstanceSniff implements PHP_CodeSniffer_Sniff |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Returns the token types that this sniff is interested in. |
||
| 12 | * @return array |
||
| 13 | */ |
||
| 14 | public function register(): array |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Processes the tokens that this sniff is interested in. |
||
| 21 | * |
||
| 22 | * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
||
| 23 | * @param integer $stackPtr The position in the stack where |
||
| 24 | * the token was found. |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Gets the warning message for this sniff. |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | protected function getWarningMessage(string $functionName): string |
||
| 52 |