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

Method demo

examples/demo.php:2647–2661  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2645class ArgumentCountDemo
2646{
2647 public function demo(): void
2648 {
2649 $user = new User('Alice', 'alice@test.com');
2650
2651 // Correct — no diagnostic:
2652 $user->getEmail();
2653 $user->setName('Bob');
2654 $user->addRoles('admin', 'editor', 'viewer'); // variadic
2655
2656 // Too few arguments — error diagnostic appears:
2657 $user->setStatus();
2658
2659 // Too many arguments — error diagnostic appears:
2660 $user->getEmail('extra');
2661 }
2662}
2663
2664class TypeErrorDemo

Callers

nothing calls this directly

Calls 4

getEmailMethod · 0.80
setNameMethod · 0.80
addRolesMethod · 0.80
setStatusMethod · 0.80

Tested by

no test coverage detected