mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
remove uneeded check - already knonw route type
This commit is contained in:
parent
4640510f38
commit
fdb21e8a17
@ -82,21 +82,7 @@ final class RouteInfoFactory
|
||||
private function createRouteInfoFromArgs(Node $expr, array $methods = []): ?RouteInfo
|
||||
{
|
||||
$pathArgument = $expr->args[0]->value;
|
||||
|
||||
if ($pathArgument instanceof ClassConstFetch) {
|
||||
if ($this->nameResolver->isName($pathArgument->class, 'self')) {
|
||||
if (! $this->nameResolver->isName($pathArgument->name, 'class')) {
|
||||
// get constant value
|
||||
$routePath = $this->valueResolver->resolve($pathArgument);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
$routePath = $this->valueResolver->resolve($pathArgument);
|
||||
}
|
||||
$routePath = $this->valueResolver->resolve($pathArgument);
|
||||
|
||||
// route path is needed
|
||||
if ($routePath === null || ! is_string($routePath)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user