Code Duplication    Length = 22-22 lines in 2 locations

src/Console/Command/Traits/CopyCommandAwareTrait.php 1 location

@@ 15-36 (lines=22) @@
12
use Symfony\Component\Console\Input\ArrayInput;
13
use Symfony\Component\Console\Output\OutputInterface;
14
15
trait DumpFileCommandAwareTrait
16
{
17
    /**
18
     * @param OutputInterface $output
19
     * @param $target
20
     * @param $content
21
     *
22
     * @return integer
23
     */
24
    private function write(OutputInterface $output, $target, $content)
25
    {
26
        $command = $this->getApplication()->find('filesystem:dump-file');
27
28
        $input = new ArrayInput([
29
            'command' => $command->getName(),
30
            '--target' => $target,
31
            '--content' => $content,
32
        ]);
33
34
        return $command->run($input, $output);
35
    }
36
}
37

src/Console/Command/Traits/DumpFileCommandAwareTrait.php 1 location

@@ 8-29 (lines=22) @@
5
use Symfony\Component\Console\Input\ArrayInput;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
trait DumpFileCommandAwareTrait
9
{
10
    /**
11
     * @param OutputInterface $output
12
     * @param $target
13
     * @param $content
14
     *
15
     * @return integer
16
     */
17
    private function write(OutputInterface $output, $target, $content)
18
    {
19
        $command = $this->getApplication()->find('filesystem:dump-file');
20
21
        $input = new ArrayInput([
22
            'command' => $command->getName(),
23
            '--target' => $target,
24
            '--content' => $content,
25
        ]);
26
27
        return $command->run($input, $output);
28
    }
29
}
30