MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / parse_unmatched_identifier

Function parse_unmatched_identifier

src/code_actions/phpstan/ignore.rs:538–544  ·  view source on GitHub ↗

Parse the ignored identifier from an unmatched-ignore error message. PHPStan format: `"No error with identifier is reported on line ."`

(message: &str)

Source from the content-addressed store, hash-verified

536///
537/// PHPStan format: `"No error with identifier <id> is reported on line <N>."`
538fn parse_unmatched_identifier(message: &str) -> Option<String> {
539 let prefix = "No error with identifier ";
540 let start = message.find(prefix)?;
541 let after = &message[start + prefix.len()..];
542 let end = after.find(" is reported")?;
543 Some(after[..end].to_string())
544}
545
546/// Parse the line number from an unmatched-ignore error message.
547///

Callers 2

resolve_remove_ignoreMethod · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected