Build a `TextEdit` that appends `// @phpstan-ignore ` at the end of a line.
(_content: &str, line: u32, line_text: &str, identifier: &str)
| 293 | /// Build a `TextEdit` that appends `// @phpstan-ignore <id>` at the end |
| 294 | /// of a line. |
| 295 | fn build_eol_comment(_content: &str, line: u32, line_text: &str, identifier: &str) -> TextEdit { |
| 296 | let end_col = line_text.len() as u32; |
| 297 | TextEdit { |
| 298 | range: Range { |
| 299 | start: Position { |
| 300 | line, |
| 301 | character: end_col, |
| 302 | }, |
| 303 | end: Position { |
| 304 | line, |
| 305 | character: end_col, |
| 306 | }, |
| 307 | }, |
| 308 | new_text: format!(" // @phpstan-ignore {}", identifier), |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | /// Build a `TextEdit` that removes a `@phpstan-ignore` comment or a |
| 313 | /// specific identifier from it. |
no outgoing calls
no test coverage detected