public function getMergedPath($key)
    {
        $mergedPath = [];

        $hasCatchAll = isset($this->defaults['*']);
        $hasDefault  = isset($this->defaults[$key]);
        $hasPath     = isset($this->paths[$key]);

        // Before we try merging paths we check the defaults
        // for a catch all and a default for the requested path.
        if ($hasCatchAll && $hasDefault) {
            $mergedPath = array_merge($this->defaults['*'], $this->defaults[$key]);
        }

        // When only a catch all exists we update the
        // 'base' path with the catch all.
        elseif ($hasCatchAll) {
            $mergedPath = $this->defaults['*'];
        }

        // When only a default for the requested path exists we
        // update the 'base' path with the defaults.
        elseif ($hasDefault) {
            $mergedPath = $this->defaults[$key];
        }

        // Lastly when a specific path configuration exists for
        // the requested path we merge it with the 'base' path.
        if ($hasPath) {
            return array_merge($mergedPath, $this->paths[$key]);
        }

        return $mergedPath;
    }