Fix HTTPS detection

Fix #281
This commit is contained in:
William DURAND 2014-01-20 14:18:02 +01:00
parent 347ac74648
commit 667044863c

View File

@ -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)) {