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

Method demo

examples/demo.php:1950–1959  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1948class SnippetInsertionDemo
1949{
1950 public function demo(): Response
1951 {
1952 // Completion inserts snippets with tab-stops for required params
1953 $user = new User('Alice', 'alice@example.com');
1954 $user->setName('Bob'); // → setName(${1:$name})
1955 $user->toArray(); // → toArray() (no params)
1956 $user->addRoles(); // → addRoles() (variadic — no tab-stops)
1957 User::findByEmail('a@b.c'); // → findByEmail(${1:$email})
1958 return new Response(200); // → Response(${1:$statusCode})
1959 }
1960}
1961
1962

Callers

nothing calls this directly

Calls 4

setNameMethod · 0.80
addRolesMethod · 0.80
findByEmailMethod · 0.80
toArrayMethod · 0.45

Tested by

no test coverage detected