From 667044863c93efc68b36d6ae80a3d1058880666e Mon Sep 17 00:00:00 2001 From: William DURAND Date: Mon, 20 Jan 2014 14:18:02 +0100 Subject: [PATCH] Fix HTTPS detection Fix #281 --- Extractor/Handler/PhpDocHandler.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Extractor/Handler/PhpDocHandler.php b/Extractor/Handler/PhpDocHandler.php index 42c475d..f27b5f1 100644 --- a/Extractor/Handler/PhpDocHandler.php +++ b/Extractor/Handler/PhpDocHandler.php @@ -54,12 +54,17 @@ class PhpDocHandler implements HandlerInterface 'description' => '', ); } - if ('_scheme' == $name) { + + if ('_scheme' === $name) { $https = ('https' == $value); $annotation->setHttps($https); } } + if (method_exists($route, 'getSchemes')) { + $annotation->setHttps(in_array('https', $route->getSchemes())); + } + $paramDocs = array(); foreach (explode("\n", $this->commentExtractor->getDocComment($method)) as $line) { if (preg_match('{^@param (.+)}', trim($line), $matches)) {