src/Service/Router/Route.php
public function setSuccessStatus(int $status, string $description = ""): RouteInterface
    {
        $this->statuses[$status] = HttpStatus::create()
            ->setStatus($status)
            ->setDescription($description)
            ->setMainSuccess(true);

        /**
         * This middleware is an "AFTER" middleware, so add it first to be run last...
         */
        return $this->addFirst(new SuccessStatusMiddleware($status));
    }
public function setSuccessStatus(int $status, string $description = ""): RouteInterface
    {
        $this->statuses[$status] = HttpStatus::create()
            ->setStatus($status)
            ->setDescription($description)
            ->setMainSuccess(true);

        /**
         * This middleware is an "AFTER" middleware, so add it first to be run last...
         */
        return $this->addFirst(new SuccessStatusMiddleware($status));
    }
public function setSuccessStatus ( int $ status , string $ description = "" ) : RouteInterface { $ this -> statuses [ $ status ] = HttpStatus :: create ( ) -> setStatus ( $ status ) -> setDescription ( $ description ) -> setMainSuccess ( true ) ; /**
         * This middleware is an "AFTER" middleware, so add it first to be run last...
         */ return $ this -> addFirst ( new SuccessStatusMiddleware ( $ status ) ) ; }
Set status code in case of success response

@param int $status
@param string $description

@return RouteInterface
Set status code in case of success response