more readable

This commit is contained in:
Florent DUBOST 2013-10-11 16:40:26 +02:00
parent 8f6ac59c97
commit f16aa64cf0

View File

@ -108,11 +108,11 @@ class ApiDocExtractor
if ($method = $this->getReflectionMethod($route->getDefault('_controller'))) {
if ($annotation = $this->reader->getMethodAnnotation($method, self::ANNOTATION_CLASS)) {
if ($annotation->isResource()) {
if (!($resource = $annotation->getResource())) {
if ($resource = $annotation->getResource()) {
$resources[] = $resource;
} else {
// remove format from routes used for resource grouping
$resources[] = str_replace('.{_format}', '', $route->getPattern());
} else {
$resources[] = $resource;
}
}