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

Function detects_extra_param

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

Source from the content-addressed store, hash-verified

1417
1418 #[test]
1419 fn detects_extra_param() {
1420 let php = r#"<?php
1421class Foo {
1422 /**
1423 * @param string $a
1424 * @param int $b
1425 */
1426 public function bar(string $a): void {}
1427}
1428"#;
1429 let pos = php.find("@param string").unwrap() as u32;
1430 let info = find_info(php, pos).unwrap();
1431 let cl = no_class_loader();
1432 assert!(check_needs_update(
1433 &info,
1434 php,
1435 &[],
1436 &cl,
1437 no_function_loader(),
1438 &HashMap::new(),
1439 &None,
1440 ));
1441 }
1442
1443 #[test]
1444 fn detects_reordered_params() {

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