protected function statusCodes($statusCode, $customDescription = null)
    {
        if ($customDescription) {
            $description = $customDescription;
        }
        if ($customDescription !== null || array_key_exists($statusCode, $this->defaultStatusCodes)) {
            if (!isset($description)) {
                $description = $this->defaultStatusCodes[$statusCode];
            }
            $description = !is_array($description) ? [$description] : $description;
            $this->addStatusCode($statusCode, $description);
        }

        return $this;
    }
protected function statusCodes($statusCode, $customDescription = null)
    {
        if ($customDescription) {
            $description = $customDescription;
        }
        if ($customDescription !== null || array_key_exists($statusCode, $this->defaultStatusCodes)) {
            if (!isset($description)) {
                $description = $this->defaultStatusCodes[$statusCode];
            }
            $description = !is_array($description) ? [$description] : $description;
            $this->addStatusCode($statusCode, $description);
        }

        return $this;
    }
protected function statusCodes ( $ statusCode , $ customDescription = null ) { if ( $ customDescription ) { $ description = $ customDescription ; } if ( $ customDescription !== null || array_key_exists ( $ statusCode , $ this -> defaultStatusCodes ) ) { if ( ! isset ( $ description ) ) { $ description = $ this -> defaultStatusCodes [ $ statusCode ] ; } $ description = ! is_array ( $ description ) ? [ $ description ] : $ description ; $ this -> addStatusCode ( $ statusCode , $ description ) ; } return $ this ; }
Method that allows to choose between status
code passing the code and optional description.

@param int         $statusCode        The status code
@param string|null $customDescription The description

@return self
Method that allows to choose between status code passing the code and optional description .