protected function resolveAfter($after)
    {
        $getAfter = $this->resolveMiddleware($after);

        return function (Request $request, Response $response, Application $app) use ($getAfter) {
            $callback = $getAfter($request);
            if (!is_callable($callback)) {
                return null;
            }

            return $callback($request, $response, $app);
        };
    }
protected function resolveAfter($after)
    {
        $getAfter = $this->resolveMiddleware($after);

        return function (Request $request, Response $response, Application $app) use ($getAfter) {
            $callback = $getAfter($request);
            if (!is_callable($callback)) {
                return null;
            }

            return $callback($request, $response, $app);
        };
    }
protected function resolveAfter ( $ after ) { $ getAfter = $ this -> resolveMiddleware ( $ after ) ; return function ( Request $ request , Response $ response , Application $ app ) use ( $ getAfter ) { $ callback = $ getAfter ( $ request ) ; if ( ! is_callable ( $ callback ) ) { return null ; } return $ callback ( $ request , $ response , $ app ) ; } ; }
Returns a closure that will resolve the middleware callback
to call on kernel response and call it.

@param array|string|null $after

@return \Closure
Returns a closure that will resolve the middleware callback to call on kernel response and call it .