Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Jun 25, 2014
1 parent 87b690d commit b48650a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Annotation/ApiDoc.php
Expand Up @@ -228,15 +228,15 @@ public function __construct(array $data)
$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'];
Expand Down
8 changes: 5 additions & 3 deletions Extractor/Handler/FosRestHandler.php
Expand Up @@ -56,11 +56,11 @@ public function handle(ApiDoc $annotation, array $annotations, Route $route, \Re
}
}
}

/**
* Handle FOSRestBundle requirements in order to return a string.
*
* @param mixed $requirements
* @param mixed $requirements
* @return string
*/
private function handleRequirements($requirements)
Expand All @@ -70,8 +70,10 @@ private function handleRequirements($requirements)
return $requirements->getHtmlPattern();
}
$class = get_class($requirements);

return substr($class, strrpos($class, '\\')+1);
}
return (string)$requirements;

return (string) $requirements;
}
}
2 changes: 1 addition & 1 deletion Formatter/FormatterInterface.php
Expand Up @@ -27,7 +27,7 @@ public function format(array $collection);
* Format documentation data for one route.
*
* @param ApiDoc $annotation
* return string|array
* return string|array
*/
public function formatOne(ApiDoc $annotation);
}
2 changes: 1 addition & 1 deletion Parser/ValidationParser.php
Expand Up @@ -233,7 +233,7 @@ protected function parseConstraint(Constraint $constraint, $vparams, $className,
/**
* Return Choice constraint choices.
*
* @param Constraint $constraint
* @param Constraint $constraint
* @param $className
* @return array
* @throws \Symfony\Component\Validator\Exception\ConstraintDefinitionException
Expand Down
2 changes: 1 addition & 1 deletion Tests/Extractor/Handler/FosRestHandlerTest.php
Expand Up @@ -86,7 +86,7 @@ public function testGetWithQueryParamNoDefault()

$this->assertArrayNotHasKey('default', $filter);
}

public function testGetWithConstraintAsRequirements()
{
$container = $this->getContainer();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/Controller/TestController.php
Expand Up @@ -130,7 +130,7 @@ public function zActionWithQueryParamAction()
public function zActionWithQueryParamNoDefaultAction()
{
}

/**
* @ApiDoc()
* @QueryParam(name="mail", requirements=@Email, description="Email of someone.")
Expand Down

0 comments on commit b48650a

Please sign in to comment.