Parse the ignored identifier from an unmatched-ignore error message. PHPStan format: `"No error with identifier is reported on line ."`
(message: &str)
| 536 | /// |
| 537 | /// PHPStan format: `"No error with identifier <id> is reported on line <N>."` |
| 538 | fn 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 | /// |
no test coverage detected