mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix getSymbolInformation() for symbols containing ":" (#3400)
Currently a Symbol like `10-15:array{foo: string}` will return ` string}`, as the regex does not specify a string-start caret.
This commit is contained in:
parent
47cf69ded1
commit
588be3b269
@ -1034,7 +1034,7 @@ class Codebase
|
||||
public function getSymbolInformation(string $file_path, string $symbol)
|
||||
{
|
||||
if (\is_numeric($symbol[0])) {
|
||||
return \preg_replace('/[^:]*:/', '', $symbol);
|
||||
return \preg_replace('/^[^:]*:/', '', $symbol);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user