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

Method demo

examples/demo.php:1383–1394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1381class GenericShapeDemo
1382{
1383 public function demo(): void
1384 {
1385 $src = new ScaffoldingGenericShape();
1386
1387 // Template params inside array shape bodies are substituted through inheritance
1388 $result = $src->getResult();
1389 $result['data']->open(); // array{data: T} with T=Gift → Gift
1390
1391 // Chained bracket access walks shape key then list element
1392 $first = $result['items'][0];
1393 $first->open(); // list<T> with T=Gift → Gift
1394 }
1395}
1396
1397

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
getResultMethod · 0.45

Tested by

no test coverage detected