public function redirect($redirectStatus = 302)
    {
        if (!in_array($redirectStatus, [false, 301, 302], true)) {
            throw new InvalidArgumentException('The redirect status code must be 301, 302 or false');
        }

        $this->redirectStatus = $redirectStatus;

        return $this;
    }
public function redirect($redirectStatus = 302)
    {
        if (!in_array($redirectStatus, [false, 301, 302], true)) {
            throw new InvalidArgumentException('The redirect status code must be 301, 302 or false');
        }

        $this->redirectStatus = $redirectStatus;

        return $this;
    }
public function redirect ( $ redirectStatus = 302 ) { if ( ! in_array ( $ redirectStatus , [ false , 301 , 302 ] , true ) ) { throw new InvalidArgumentException ( 'The redirect status code must be 301, 302 or false' ) ; } $ this -> redirectStatus = $ redirectStatus ; return $ this ; }
Set HTTP redirect status code.

@param int|false $redirectStatus Redirect HTTP status code

@return self
Set HTTP redirect status code .