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

Function build_throws_edit

src/code_actions/phpstan/add_throws.rs:429–435  ·  view source on GitHub ↗

Build a `TextEdit` that inserts a `@throws` tag into the docblock.

(content: &str, info: &DocblockInfo, short_name: &str)

Source from the content-addressed store, hash-verified

427
428/// Build a `TextEdit` that inserts a `@throws` tag into the docblock.
429fn build_throws_edit(content: &str, info: &DocblockInfo, short_name: &str) -> TextEdit {
430 if info.has_docblock {
431 insert_throws_into_existing_docblock(content, info, short_name)
432 } else {
433 create_docblock_with_throws(content, info, short_name)
434 }
435}
436
437/// Insert a `@throws` line into an existing docblock.
438///