added phpdoc
This commit is contained in:
parent
c413e7ba39
commit
7464dcd206
@ -36,12 +36,19 @@ class RouterListener implements EventSubscriberInterface
|
||||
private $context;
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher
|
||||
* @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface)
|
||||
* @param LoggerInterface|null $logger The logger
|
||||
*/
|
||||
public function __construct($matcher, RequestContext $context = null, LoggerInterface $logger = null)
|
||||
{
|
||||
if (!$matcher instanceof UrlMatcherInterface && !$matcher instanceof RequestMatcherInterface) {
|
||||
throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.');
|
||||
}
|
||||
|
||||
|
||||
if (null === $context && !$matcher instanceof RequestContextAwareInterface) {
|
||||
throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user