This commit is contained in:
William DURAND 2014-06-25 08:46:01 +02:00
parent 87b690d5e1
commit b48650a9e0
6 changed files with 16 additions and 14 deletions

View File

@ -228,15 +228,15 @@ class ApiDoc
$this->deprecated = $data['deprecated'];
}
if (isset($data['tags'])) {
$tags = $data['tags'];
if (isset($data['tags'])) {
$tags = $data['tags'];
if (!is_array($tags)) {
$tags = array($tags);
}
if (!is_array($tags)) {
$tags = array($tags);
}
$this->tags = $tags;
}
$this->tags = $tags;
}
if (isset($data['https'])) {
$this->https = $data['https'];

View File

@ -60,7 +60,7 @@ class FosRestHandler implements HandlerInterface
/**
* Handle FOSRestBundle requirements in order to return a string.
*
* @param mixed $requirements
* @param mixed $requirements
* @return string
*/
private function handleRequirements($requirements)
@ -70,8 +70,10 @@ class FosRestHandler implements HandlerInterface
return $requirements->getHtmlPattern();
}
$class = get_class($requirements);
return substr($class, strrpos($class, '\\')+1);
}
return (string)$requirements;
return (string) $requirements;
}
}

View File

@ -27,7 +27,7 @@ interface FormatterInterface
* Format documentation data for one route.
*
* @param ApiDoc $annotation
* return string|array
* return string|array
*/
public function formatOne(ApiDoc $annotation);
}

View File

@ -233,7 +233,7 @@ class ValidationParser implements ParserInterface, PostParserInterface
/**
* Return Choice constraint choices.
*
* @param Constraint $constraint
* @param Constraint $constraint
* @param $className
* @return array
* @throws \Symfony\Component\Validator\Exception\ConstraintDefinitionException