From 725e4d9dda79f7cf38e09e4b1930e2595b9ebdff Mon Sep 17 00:00:00 2001 From: Denys Pasishnyi Date: Mon, 13 Jun 2016 00:29:59 +0200 Subject: [PATCH] #502 Hide Requirement when not set --- Extractor/Handler/FosRestHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Extractor/Handler/FosRestHandler.php b/Extractor/Handler/FosRestHandler.php index 8bddabe33..4f958e5f0 100644 --- a/Extractor/Handler/FosRestHandler.php +++ b/Extractor/Handler/FosRestHandler.php @@ -56,11 +56,15 @@ public function handle(ApiDoc $annotation, array $annotations, Route $route, \Re 'description' => $annot->description, 'default' => $annot->default, )); - } else { + } elseif ($annot->requirements !== null) { $annotation->addFilter($annot->name, array( 'requirement' => $this->handleRequirements($annot->requirements).((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''), 'description' => $annot->description, )); + } else { + $annotation->addFilter($annot->name, array( + 'description' => $annot->description, + )); } } }