[Routing] removed redundant parameter in addRoute method
This commit is contained in:
parent
3ab5a51e17
commit
713e8c26a6
@ -139,17 +139,17 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
|||||||
foreach ($class->getMethods() as $method) {
|
foreach ($class->getMethods() as $method) {
|
||||||
if ($annots = $this->reader->getMethodAnnotation($method, $this->routesAnnotationClass)) {
|
if ($annots = $this->reader->getMethodAnnotation($method, $this->routesAnnotationClass)) {
|
||||||
foreach ($annots->getRoutes() as $annot) {
|
foreach ($annots->getRoutes() as $annot) {
|
||||||
$this->addRoute($collection, $annot, $globals, $annot, $class, $method);
|
$this->addRoute($collection, $annot, $globals, $class, $method);
|
||||||
}
|
}
|
||||||
} elseif ($annot = $this->reader->getMethodAnnotation($method, $this->routeAnnotationClass)) {
|
} elseif ($annot = $this->reader->getMethodAnnotation($method, $this->routeAnnotationClass)) {
|
||||||
$this->addRoute($collection, $annot, $globals, $annot, $class, $method);
|
$this->addRoute($collection, $annot, $globals, $class, $method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $collection;
|
return $collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addRoute(RouteCollection $collection, $annot, $globals, $annot, \ReflectionClass $class, \ReflectionMethod $method)
|
protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method)
|
||||||
{
|
{
|
||||||
if (null === $annot->getName()) {
|
if (null === $annot->getName()) {
|
||||||
$annot->setName($this->getDefaultRouteName($class, $method));
|
$annot->setName($this->getDefaultRouteName($class, $method));
|
||||||
|
Reference in New Issue
Block a user