protected static function addLocalConfiguration($componentDirectory, array $component)
    {
        $component['local']   = [];
        $componentDirectories = [];
        for ($dir = 0; $dir < count($component['path']); ++$dir) {
            $componentDirectory = $componentDirectories[] = dirname($componentDirectory);
        }

        foreach (array_reverse($componentDirectories) as $componentDirectory) {
            $component['local'][] = self::getLocalConfiguration($componentDirectory);
        }

        return $component;
    }