- Removed an unused 'methods' property
This commit is contained in:
parent
67aa7e513d
commit
13ccb13a0b
@ -175,9 +175,7 @@ class ReflectedClass implements ReflectedInterface
|
||||
public function getAttribute(string $attributeType): ?object
|
||||
{
|
||||
foreach($this->getAttributes(true, $attributeType) as $attribute) {
|
||||
if ($attribute->object instanceof $attributeType) {
|
||||
return $attribute;
|
||||
}
|
||||
return $attribute;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -81,6 +81,14 @@ class RouteFetcher {
|
||||
{
|
||||
$attributes ??= $this->attributes;
|
||||
|
||||
/*
|
||||
8.5: return $attributes
|
||||
|> serialize(...)
|
||||
|> md5(...)
|
||||
|> (fn($x) => substr($x, 0, 7))
|
||||
|> (fn($x) => $this->handleCaching())
|
||||
*/
|
||||
|
||||
return $this->handleCaching(substr(md5(serialize($attributes)), 0, 7), function() use ($attributes) : array {
|
||||
$list = [];
|
||||
|
||||
@ -124,10 +132,7 @@ class RouteFetcher {
|
||||
|
||||
$route->class = $class;
|
||||
$route->classMethod = $func;
|
||||
|
||||
if (false === ($route->methods ?? false)) {
|
||||
$route->methods = $methods ?? $this->defaultMethods;
|
||||
}
|
||||
$route->method ??= $methods ?? $this->defaultMethods;
|
||||
|
||||
if (false !== ($this->callback ?? false)) {
|
||||
call_user_func_array($this->callback, [$route]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user