/**
  * Checks if $valueObject matches $matcher rules.
  *
  * @param \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface $matcher
  * @param ValueObject $valueObject
  *
  * @throws \InvalidArgumentException
  * @return bool
  */
 protected function doMatch(MatcherInterface $matcher, ValueObject $valueObject)
 {
     if (!$valueObject instanceof Location) {
         throw new InvalidArgumentException('Value object must be a valid Location instance');
     }
     return $matcher->matchLocation($valueObject);
 }
 /**
  * Checks if $valueObject matches $matcher rules.
  *
  * @param \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface $matcher
  * @param ValueObject $valueObject
  *
  * @throws \InvalidArgumentException
  *
  * @return bool
  */
 protected function doMatch(MatcherInterface $matcher, View $view)
 {
     @trigger_error("LocationMatcherFactory is deprecated, and will be removed in ezpublish-kernel 6.1.\n" . 'Use the ServiceAwareMatcherFactory with the relative namespace as a constructor argument.', E_USER_DEPRECATED);
     if (!$view instanceof LocationValueView) {
         throw new InvalidArgumentException('Value object must be a valid Location instance');
     }
     return $matcher->matchLocation($view);
 }