protected function doMatch($actual)
    {
        if ($this->isCountable($actual)) {
            $this->count = count($actual);
        }

        if (is_string($actual)) {
            $this->count = strlen($actual);
        }

        if (isset($this->count)) {
            return $this->expected === $this->count;
        }

        throw new InvalidArgumentException('Length matcher requires a string, array, or Countable');
    }
protected function doMatch($actual)
    {
        if ($this->isCountable($actual)) {
            $this->count = count($actual);
        }

        if (is_string($actual)) {
            $this->count = strlen($actual);
        }

        if (isset($this->count)) {
            return $this->expected === $this->count;
        }

        throw new InvalidArgumentException('Length matcher requires a string, array, or Countable');
    }
protected function doMatch ( $ actual ) { if ( $ this -> isCountable ( $ actual ) ) { $ this -> count = count ( $ actual ) ; } if ( is_string ( $ actual ) ) { $ this -> count = strlen ( $ actual ) ; } if ( isset ( $ this -> count ) ) { return $ this -> expected === $ this -> count ; } throw new InvalidArgumentException ( 'Length matcher requires a string, array, or Countable' ) ; }
Match the length of the countable interface or string against
the expected value.

@param  string|array|Countable $actual
@return mixed
Match the length of the countable interface or string against the expected value .