eee
This commit is contained in:
+8
-6
@@ -357,15 +357,17 @@ class Container implements ContainerInterface
|
||||
/**
|
||||
* @param ReflectionParameter $parameter
|
||||
* @return string|int|bool|null
|
||||
* @throws
|
||||
*/
|
||||
private function getTypeValue(ReflectionParameter $parameter): string|int|bool|null
|
||||
{
|
||||
return match ($parameter->getType()) {
|
||||
'string' => '',
|
||||
'int', 'float' => 0,
|
||||
'', null, 'object', 'mixed' => NULL,
|
||||
'bool' => false,
|
||||
'default' => null
|
||||
return match ($parameter->getType()->getName()) {
|
||||
'string' => '',
|
||||
'int', 'float' => 0,
|
||||
'', 'mixed' => NULL,
|
||||
'array' => [],
|
||||
'bool' => false,
|
||||
default => null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,10 @@ class Scanner extends Component
|
||||
if (count($data) > 0) {
|
||||
return;
|
||||
}
|
||||
$data = $reflect->getAttributes(\Attribute::class);
|
||||
if (count($data) > 0) {
|
||||
return;
|
||||
}
|
||||
$object = $this->container->parse($class);
|
||||
$methods = $this->container->getReflectionClass($class);
|
||||
foreach ($methods->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
|
||||
|
||||
Reference in New Issue
Block a user