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

Function detects_reordered_params

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

Source from the content-addressed store, hash-verified

1442
1443 #[test]
1444 fn detects_reordered_params() {
1445 let php = r#"<?php
1446class Foo {
1447 /**
1448 * @param int $b
1449 * @param string $a
1450 */
1451 public function bar(string $a, int $b): void {}
1452}
1453"#;
1454 let pos = php.find("@param int").unwrap() as u32;
1455 let info = find_info(php, pos).unwrap();
1456 let cl = no_class_loader();
1457 assert!(check_needs_update(
1458 &info,
1459 php,
1460 &[],
1461 &cl,
1462 no_function_loader(),
1463 &HashMap::new(),
1464 &None,
1465 ));
1466 }
1467
1468 #[test]
1469 fn no_update_when_params_match() {

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