Resolve notice on undefined index

fixes #384
This commit is contained in:
Jaapio
2024-11-06 12:58:54 +01:00
parent 54e10d44fc
commit 0c70d2c566
2 changed files with 3 additions and 2 deletions
@@ -104,12 +104,12 @@ class AbstractPHPStanFactory implements Factory
$fixed[] = [
rtrim($token[Lexer::VALUE_OFFSET], " \t"),
Lexer::TOKEN_PHPDOC_EOL,
$token[2],
$token[2] ?? 0,
];
$fixed[] = [
ltrim($token[Lexer::VALUE_OFFSET], "\n\r"),
Lexer::TOKEN_HORIZONTAL_WS,
$token[2] + 1,
($token[2] ?? 0) + 1,
];
continue;
}