Code Duplication    Length = 11-12 lines in 2 locations

src/Magestead/Command/NewCommand.php 1 location

@@ 137-147 (lines=11) @@
134
     * @param array           $config
135
     * @param OutputInterface $output
136
     */
137
    protected function saveConfigFile(array $config, OutputInterface $output)
138
    {
139
        $dumper = new Dumper();
140
        $yaml = $dumper->dump($config, 6);
141
142
        try {
143
            file_put_contents($this->_projectPath.'/magestead.yaml', $yaml);
144
        } catch (\Exception $e) {
145
            $output->writeln('<error>Unable to write to the YAML file</error>');
146
        }
147
    }
148
149
    /**
150
     * @param OutputInterface $output

src/Magestead/Installers/MagentoProject.php 1 location

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