public function matches(string $pattern, string $translation = null): bool
    {
        return $this->pattern === $pattern && (! $translation || $translation === $this->translation);
    }
public function matches(string $pattern, string $translation = null): bool
    {
        return $this->pattern === $pattern && (! $translation || $translation === $this->translation);
    }
public function matches ( string $ pattern , string $ translation = null ) : bool { return $ this -> pattern === $ pattern && ( ! $ translation || $ translation === $ this -> translation ) ; }
Checks whether the resolver matches a given pattern and optional translation.

@param string      $pattern
@param null|string $translation

@return bool
Checks whether the resolver matches a given pattern and optional translation .