public function withStatusCode(int $code)
    {
        if ($this->statusCode == $code) {
            return $this;
        }

        $that = clone($this);
        $that->statusCode = $code;
        return $that;
    }
public function withStatusCode(int $code)
    {
        if ($this->statusCode == $code) {
            return $this;
        }

        $that = clone($this);
        $that->statusCode = $code;
        return $that;
    }
public function withStatusCode ( int $ code ) { if ( $ this -> statusCode == $ code ) { return $ this ; } $ that = clone ( $ this ) ; $ that -> statusCode = $ code ; return $ that ; }
Returns a copy of the page with the status code set.

@param int $code
The status code to set.
@return static
Returns a copy of the page with the status code set .