public function resolveDependencies(array $data) {
        
        $new_data = array();
        $original_count = \count($data);
        while (\count($new_data) < $original_count) {
            foreach ($data as $name => $dependencies) {
                if (!\count($dependencies)) {
                    $new_data[] = $name;
                    unset($data[$name]);
                    continue;
                }

                foreach ($dependencies as $key => $dependency) {
                    if (\in_array($dependency, $new_data)) {
                        unset($data[$name][$key]);
                    }
                }
            }
        }
        return $new_data;
    }