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

Method demo

examples/demo.php:1973–1988  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1971class GoToDefinitionDemo
1972{
1973 public function demo(): void
1974 {
1975 // Ctrl+Click on any symbol to jump to its definition
1976 $target = new GtdTarget();
1977 $target->label(); // Ctrl+Click → GtdTarget::label() (not Pen::label)
1978 $target->format(); // Ctrl+Click → GtdTarget::format() (not User::format)
1979 GtdTarget::FORMAT; // Ctrl+Click → class constant (not Renderable::format)
1980 GtdParent::CONNECTION; // Ctrl+Click → GtdParent (not Model::CONNECTION)
1981 GtdTarget::$defaultRole; // Ctrl+Click → GtdTarget (not User::$defaultRole)
1982
1983 $helper = gtdHelper();
1984 echo $helper; // Ctrl+Click on $helper → jumps to assignment
1985
1986 define('APP_VERSION', '1.0.0');
1987 echo APP_VERSION; // BUG: Ctrl+Click should jump to define() above
1988 }
1989}
1990
1991class GtdParent { public const string CONNECTION = 'gtd'; }

Callers

nothing calls this directly

Calls 3

gtdHelperFunction · 0.85
labelMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected