src/Middleware/Middleware/MiddlewareAbstract.php
public function process(
        RequestInterface $request,
        ResponseInterface $response,
        DelegateInterface $next = null
    ) {
        // before
        $response = $this->before($request, $response);

        // next middleware
        if ($next) {
            $response = $next->next($request, $response);
        }

        // after
        return $this->after($request, $response);
    }
public function process(
        RequestInterface $request,
        ResponseInterface $response,
        DelegateInterface $next = null
    ) {
        // before
        $response = $this->before($request, $response);

        // next middleware
        if ($next) {
            $response = $next->next($request, $response);
        }

        // after
        return $this->after($request, $response);
    }
public function process ( RequestInterface $ request , ResponseInterface $ response , DelegateInterface $ next = null ) { // before $ response = $ this -> before ( $ request , $ response ) ; // next middleware if ( $ next ) { $ response = $ next -> next ( $ request , $ response ) ; } // after return $ this -> after ( $ request , $ response ) ; }
Make process logic clear !

{@inheritDoc}
Make process logic clear !