Code Duplication    Length = 11-11 lines in 2 locations

src/Magestead/Command/SetupCommand.php 1 location

@@ 115-125 (lines=11) @@
112
     * @param array $config
113
     * @param OutputInterface $output
114
     */
115
    protected function saveConfigFile(array $config, OutputInterface $output)
116
    {
117
        $dumper = new Dumper();
118
        $yaml = $dumper->dump($config, 6);
119
120
        try {
121
            file_put_contents($this->_projectPath . '/magestead.yaml', $yaml);
122
        } catch (\Exception $e) {
123
            $output->writeln('<error>Unable to write to the YAML file</error>');
124
        }
125
    }
126
127
    /**
128
     * @param OutputInterface $output

src/Magestead/Installers/MagentoProject.php 1 location

@@ 308-318 (lines=11) @@
305
     * @param $behat
306
     * @param $progress
307
     */
308
    protected function saveBehatConfig($projectPath, OutputInterface $output, $behat, $progress)
309
    {
310
        $dumper = new Dumper();
311
        $yaml = $dumper->dump($behat, 6);
312
        try {
313
            file_put_contents($projectPath . '/behat.yml', $yaml);
314
            $progress->advance();
315
        } catch (\Exception $e) {
316
            $output->writeln('<error>Unable to write to the YAML file</error>');
317
        }
318
    }
319
}