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

        return (bool) preg_match($this->expected, $actual);
    }
protected function doMatch($actual)
    {
        if (!is_string($actual)) {
            throw new \InvalidArgumentException('PatternMatcher expects a string');
        }

        return (bool) preg_match($this->expected, $actual);
    }
protected function doMatch ( $ actual ) { if ( ! is_string ( $ actual ) ) { throw new \ InvalidArgumentException ( 'PatternMatcher expects a string' ) ; } return ( bool ) preg_match ( $ this -> expected , $ actual ) ; }
Match the actual value against a regular expression.

@param $actual
@return mixed
Match the actual value against a regular expression .