Skip to content

Commit 7be4f59

Browse files
Merge pull request #22 from dimitriBouteille/fix/empty-parser-arg
Fix Uninitialized string offset 1 in /src/Helpers/Parser.php on line 35
2 parents 381e002 + f2e7587 commit 7be4f59

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)