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