simplify hasScheme method
... and correct the mistake in docblock
This commit is contained in:
parent
2ecf45c0f2
commit
ad0d93baf4
@ -251,11 +251,23 @@ class Route implements \Serializable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a scheme requirement has been set.
|
||||
*
|
||||
* @param string $scheme
|
||||
*
|
||||
* @return bool true if the scheme requirement exists, otherwise false
|
||||
*/
|
||||
public function hasScheme($scheme)
|
||||
{
|
||||
return in_array(strtolower($scheme), $this->schemes, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the uppercased HTTP methods this route is restricted to.
|
||||
* So an empty array means that any method is allowed.
|
||||
*
|
||||
* @return array The schemes
|
||||
* @return array The methods
|
||||
*/
|
||||
public function getMethods()
|
||||
{
|
||||
|
Reference in New Issue
Block a user