mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fixes typehint for Route
This commit is contained in:
parent
8d771a925f
commit
28b7fa7d0e
@ -92,7 +92,7 @@ class ApiDocExtractor
|
|||||||
*
|
*
|
||||||
* @param \Traversable $routes \Traverseable of Route-objects for which the annotations should be extracted
|
* @param \Traversable $routes \Traverseable of Route-objects for which the annotations should be extracted
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if one element of \Traversable does not implement RouteInterface
|
* @throws \InvalidArgumentException if one element of \Traversable does not implement Route
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -102,8 +102,8 @@ class ApiDocExtractor
|
|||||||
$resources = array();
|
$resources = array();
|
||||||
|
|
||||||
foreach ($routes as $route) {
|
foreach ($routes as $route) {
|
||||||
if (!($route instanceof RouterInterface)) {
|
if (!($route instanceof Route)) {
|
||||||
throw new \InvalidArgumentException(sprintf('All elements of $routes have to implement RouteInterface. "%s" given', gettype($route)));
|
throw new \InvalidArgumentException(sprintf('All elements of $routes must be instances of Route. "%s" given', gettype($route)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($method = $this->getReflectionMethod($route->getDefault('_controller'))) {
|
if ($method = $this->getReflectionMethod($route->getDefault('_controller'))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user