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

Method demo

examples/demo.php:2529–2542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2527class UnknownMemberDemo
2528{
2529 public function demo(): void
2530 {
2531 $user = new User('test', 'test@example.com');
2532
2533 // These resolve fine — no warning:
2534 $user->getEmail();
2535 $user->getName();
2536
2537 // Try: uncomment the next line to see the warning:
2538 $user->nonexistentMethod();
2539
2540 // Static access — unknown constant gets a warning:
2541 User::MISSING_CONST;
2542 }
2543}
2544
2545

Callers

nothing calls this directly

Calls 2

getEmailMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected