protected function doMatch($actual)
    {
        if (!is_string($actual)) {
            throw new \InvalidArgumentException('PatternMatcher expects a string');
        }

        return (bool) preg_match($this->expected, $actual);
    }