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

Function finds_existing_docblock

src/code_actions/phpstan/add_throws.rs:832–839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

830
831 #[test]
832 fn finds_existing_docblock() {
833 let php = "<?php\nclass Foo {\n /**\n * Summary.\n */\n public function bar(): void {\n throw new \\RuntimeException();\n }\n}\n";
834 // diag_line = 6 (the throw line)
835 let info = find_enclosing_docblock(php, 6).unwrap();
836 assert!(info.has_docblock);
837 assert!(info.text.contains("Summary."));
838 assert_eq!(info.indent, " ");
839 }
840
841 #[test]
842 fn finds_no_docblock() {

Callers

nothing calls this directly

Calls 2

find_enclosing_docblockFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected