public function writeYamlFile($filename, $data)
    {
        try {
            // @todo Allow the inline and indent variables to be set via command line option.
            $yaml = Yaml::dump($data->export(), 3, 2);
        } catch (\Exception $e) {
            $this->output->writeln("<error>There was an error dumping the YAML contents for $filename.</error>");
            $this->output->writeln($e->getMessage());

            return false;
        }

        try {
            // @todo Use Symfony file system instead so that exceptions can be caught.
            file_put_contents($filename, $yaml);
        } catch (\Exception $e) {
            $this->output->writeln("<error>There was an writing to $filename.</error>");
            $this->output->writeln($e->getMessage());

            return false;
        }

        return true;
    }