| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function process(File $phpcsFile, $stackPtr) |
||
| 44 | { |
||
| 45 | $tokens = $phpcsFile->getTokens(); |
||
| 46 | $varName = ltrim($tokens[$stackPtr]['content'], '$'); |
||
| 47 | |||
| 48 | if (!in_array($varName, $this->allowedNames) |
||
| 49 | && preg_match('/^_/', $varName) |
||
| 50 | ) { |
||
| 51 | $phpcsFile->addWarning( |
||
| 52 | 'Variable names may not start with an underscore', |
||
| 53 | $stackPtr, |
||
| 54 | 'IllegalVariableNameUnderscore' |
||
| 55 | ); |
||
| 59 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths