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

Function detects_missing_param

src/code_actions/update_docblock.rs:1393–1416  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1391
1392 #[test]
1393 fn detects_missing_param() {
1394 let php = r#"<?php
1395class Foo {
1396 /**
1397 * Does something.
1398 *
1399 * @param string $a The first param
1400 */
1401 public function bar(string $a, int $b): void {}
1402}
1403"#;
1404 let pos = php.find("@param string").unwrap() as u32;
1405 let info = find_info(php, pos).unwrap();
1406 let cl = no_class_loader();
1407 assert!(check_needs_update(
1408 &info,
1409 php,
1410 &[],
1411 &cl,
1412 no_function_loader(),
1413 &HashMap::new(),
1414 &None,
1415 ));
1416 }
1417
1418 #[test]
1419 fn detects_extra_param() {

Callers

nothing calls this directly

Calls 4

find_infoFunction · 0.85
no_class_loaderFunction · 0.85
unwrapMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected