Merge pull request #68 from stof/update_symfony

Fixed the ApiDocExtractor for a change in Symfony 2.1
This commit is contained in:
William Durand 2012-08-24 09:57:15 -07:00
commit ee36e599c9

View File

@ -246,7 +246,7 @@ class ApiDocExtractor
// requirements // requirements
$requirements = array(); $requirements = array();
foreach ($route->compile()->getRequirements() as $name => $value) { foreach ($route->getRequirements() as $name => $value) {
if ('_method' !== $name) { if ('_method' !== $name) {
$requirements[$name] = array( $requirements[$name] = array(
'requirement' => $value, 'requirement' => $value,
@ -289,13 +289,13 @@ class ApiDocExtractor
// method/uri // method/uri
$annotation->setMethod($route->getRequirement('_method') ?: 'ANY'); $annotation->setMethod($route->getRequirement('_method') ?: 'ANY');
$annotation->setUri($route->compile()->getPattern()); $annotation->setUri($route->getPattern());
return $annotation; return $annotation;
} }
/** /**
* @param Reflector $reflected * @param \Reflector $reflected
* @return string * @return string
*/ */
protected function getDocComment(\Reflector $reflected) protected function getDocComment(\Reflector $reflected)
@ -315,7 +315,7 @@ class ApiDocExtractor
} }
/** /**
* @param Reflector $reflected * @param \Reflector $reflected
* @return string * @return string
*/ */
protected function getDocCommentText(\Reflector $reflected) protected function getDocCommentText(\Reflector $reflected)