protected function getMiddleware(AbstractPath $path)
    {
        $classMiddleware = $this->getClassMiddlewareForPath($path)->all();

        return $this->implodeArray(
            array_merge($classMiddleware, $path->middleware, $this->middleware)
        );
    }