src/ServerRequest.php
protected function setParsedBody($data)
    {
        if (! is_null($data) && ! is_array($data) && ! is_object($data)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid parsed body provided; must be an null, or array, '
                . 'or object, "%s" provided.',
                gettype($data)
            ));
        }
        $this->parsedBody = $data;

        return $this;
    }
protected function setParsedBody($data)
    {
        if (! is_null($data) && ! is_array($data) && ! is_object($data)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid parsed body provided; must be an null, or array, '
                . 'or object, "%s" provided.',
                gettype($data)
            ));
        }
        $this->parsedBody = $data;

        return $this;
    }
protected function setParsedBody ( $ data ) { if ( ! is_null ( $ data ) && ! is_array ( $ data ) && ! is_object ( $ data ) ) { throw new InvalidArgumentException ( sprintf ( 'Invalid parsed body provided; must be an null, or array, ' . 'or object, "%s" provided.' , gettype ( $ data ) ) ) ; } $ this -> parsedBody = $ data ; return $ this ; }
Sets the parsed body.

@param null|array|object $data The parsed body

@throws \InvalidArgumentException If an unsupported argument type is
provided

@return self
Sets the parsed body .