<?php
$obj = new class
{
/** @var \PHPStan\Parser\Parser */
private $parser;
/** @var \PHPStan\Parser\FunctionCallStatementFinder */
private $functionCallStatementFinder;
public function create(\PHPStan\Reflection\ClassReflection $declaringClass, \ReflectionMethod $reflection) : \PHPStan\Reflection\Php\PhpMethodReflection
{
return new \PHPStan\Reflection\Php\PhpMethodReflection($declaringClass, $reflection, $this->parser, $this->functionCallStatementFinder, true);
}
};
$obj2 = new class
{
/** @var \PHPStan\Parser\Parser */
private $parser;
/** @var \PHPStan\Parser\FunctionCallStatementFinder */
private $functionCallStatementFinder;
public function create(\PHPStan\Reflection\ClassReflection $declaringClass, \ReflectionMethod $reflection) : \PHPStan\Reflection\Php\PhpMethodReflection
{
return new \PHPStan\Reflection\Php\PhpMethodReflection($declaringClass, $reflection, $this->parser, $this->functionCallStatementFinder, true);
}
};
var_dump((new \ReflectionClass($obj))->getName());
var_dump((new \ReflectionClass($obj2))->getName());
preferences:
45 ms | 402 KiB | 5 Q