protected function doMatch($actual)
    {
        if ($actual instanceof Traversable) {
            return $this->matchTraversable($actual);
        }

        if (is_array($actual)) {
            return array_search($this->expected, $actual, true) !== false;
        }

        if (is_string($actual)) {
            return strpos($actual, $this->expected) !== false;
        }

        throw new InvalidArgumentException('Inclusion matcher requires a string or array');
    }
protected function doMatch($actual)
    {
        if ($actual instanceof Traversable) {
            return $this->matchTraversable($actual);
        }

        if (is_array($actual)) {
            return array_search($this->expected, $actual, true) !== false;
        }

        if (is_string($actual)) {
            return strpos($actual, $this->expected) !== false;
        }

        throw new InvalidArgumentException('Inclusion matcher requires a string or array');
    }
protected function doMatch ( $ actual ) { if ( $ actual instanceof Traversable ) { return $ this -> matchTraversable ( $ actual ) ; } if ( is_array ( $ actual ) ) { return array_search ( $ this -> expected , $ actual , true ) !== false ; } if ( is_string ( $ actual ) ) { return strpos ( $ actual , $ this -> expected ) !== false ; } throw new InvalidArgumentException ( 'Inclusion matcher requires a string or array' ) ; }
Matches if an array or string contains the expected value.

@param $actual
@return mixed
@throws InvalidArgumentException
Matches if an array or string contains the expected value .