public function getDependencies()
    {
        // Simple cache.
        if (is_array($this->dependencies)) {
            return $this->dependencies;
        }
        $this->dependencies = [];

        $filter = new StatementFilter();
        $parser = new CodeParser();

        $statements = $parser->parseFile($this->directory.'/version.php');

        try {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'plugin', 'dependencies');
        } catch (\Exception $e) {
            try {
                $assign = $filter->findFirstPropertyFetchAssignment($statements, 'module', 'dependencies');
            } catch (\Exception $e) {
                return $this->dependencies;
            }
        }

        if (!$assign->expr instanceof Array_) {
            throw new \RuntimeException('The $plugin->dependencies must be assigned to an array in the version.php file.');
        }
        $this->dependencies = $filter->arrayStringKeys($assign->expr);

        return $this->dependencies;
    }