| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public static function check($tokens, $absPath) |
||
| 13 | { |
||
| 14 | [$classes,] = ParseUseStatement::findClassReferences($tokens, $absPath); |
||
|
|
|||
| 15 | |||
| 16 | foreach ($classes as $class) { |
||
| 17 | $c = $class['class']; |
||
| 18 | if (self::isQueryClass($c)) { |
||
| 19 | app(ErrorPrinter::class)->queryInBlade($absPath, $class['class'], $class['line']); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 31 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.