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

Method process

examples/demo.php:4050–4056  ·  view source on GitHub ↗

* @template T * @param Closure(int, T): void $handler * @return T */

(Closure $handler)

Source from the content-addressed store, hash-verified

4048 * @return T
4049 */
4050 public function process(Closure $handler): mixed
4051 {
4052 $params = (new \ReflectionFunction($handler))->getParameters();
4053 $type = $params[1]->getType();
4054 $class = $type instanceof \ReflectionNamedType ? $type->getName() : 'stdClass';
4055 return (new \ReflectionClass($class))->newInstanceWithoutConstructor();
4056 }
4057}
4058
4059class ScaffoldingTemplateCallableHolder

Callers 2

demoMethod · 0.45
runDemoAssertionsFunction · 0.45

Calls 2

getTypeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected