Skip to content

Commit f2e7587

Browse files
Fix Uninitialized string offset 1 in Parser
1 parent 381e002 commit f2e7587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Helpers/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function findClassName(?string $fileContent): ?string
3232
if ($tokens[$i][0] === T_CLASS) {
3333
for ($j = $i + 1;$j < $counter;$j++) {
3434
if ($tokens[$j] === '{') {
35-
$class = $tokens[$i + 2][1];
35+
$class = $tokens[$i + 2][1] ?? null;
3636
}
3737
}
3838
}

0 commit comments

Comments
 (0)