Fixes typehint for Route

This commit is contained in:
Benjamin Bender 2013-03-27 22:28:26 +01:00
parent 8d771a925f
commit 28b7fa7d0e

View File

@ -92,7 +92,7 @@ class ApiDocExtractor
*
* @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
*/
@ -102,8 +102,8 @@ class ApiDocExtractor
$resources = array();
foreach ($routes as $route) {
if (!($route instanceof RouterInterface)) {
throw new \InvalidArgumentException(sprintf('All elements of $routes have to implement RouteInterface. "%s" given', gettype($route)));
if (!($route instanceof 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'))) {