eee
This commit is contained in:
@@ -19,8 +19,9 @@ class DeferProxyGenerator
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param array $construct
|
||||
* @param array $construct
|
||||
* @return object
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public static function create(string $className, array $construct): object
|
||||
{
|
||||
@@ -60,6 +61,7 @@ class DeferProxyGenerator
|
||||
/**
|
||||
* @param string $className
|
||||
* @return string
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
private static function generate(string $className): string
|
||||
{
|
||||
@@ -195,7 +197,6 @@ class DeferProxyGenerator
|
||||
$value = $param->getDefaultValue();
|
||||
|
||||
return match (true) {
|
||||
is_null($value) => new Expr\ConstFetch(new Name('null')),
|
||||
is_bool($value) => new Expr\ConstFetch(new Name($value ? 'true' : 'false')),
|
||||
is_int($value) => new Node\Scalar\LNumber($value),
|
||||
is_float($value) => new Node\Scalar\DNumber($value),
|
||||
@@ -218,7 +219,6 @@ class DeferProxyGenerator
|
||||
private static function buildDefaultValueFromScalar(mixed $value): Node\Expr
|
||||
{
|
||||
return match (true) {
|
||||
is_null($value) => new Expr\ConstFetch(new Name('null')),
|
||||
is_bool($value) => new Expr\ConstFetch(new Name($value ? 'true' : 'false')),
|
||||
is_int($value) => new Node\Scalar\LNumber($value),
|
||||
is_float($value) => new Node\Scalar\DNumber($value),
|
||||
|
||||
Reference in New Issue
Block a user