Code Duplication    Length = 13-15 lines in 2 locations

src/Eccube/Service/Composer/ComposerProcessService.php 2 locations

@@ 51-63 (lines=13) @@
48
     * @param string $packageName format foo/bar or foo/bar:1.0.0 or "foo/bar 1.0.0"
49
     * @return bool
50
     */
51
    public function execRequire($packageName)
52
    {
53
        set_time_limit(0);
54
        $this->init();
55
        // Build command
56
        $command = $this->getPHP().' '.$this->composerFile.' require '.$packageName;
57
        $command .= ' --prefer-dist --no-progress --no-suggest --no-scripts --ignore-platform-reqs --profile --no-ansi --no-interaction -d ';
58
        $command .= $this->workingDir.' 2>&1';
59
        log_info($command);
60
        $this->runCommand($command);
61
62
        return true;
63
    }
64
65
    /**
66
     * This function to remove a plugin by composer remove
@@ 72-86 (lines=15) @@
69
     * @param string $packageName format foo/bar or foo/bar:1.0.0 or "foo/bar 1.0.0"
70
     * @return bool
71
     */
72
    public function execRemove($packageName)
73
    {
74
        set_time_limit(0);
75
        $this->init();
76
        // Build command
77
        $command = $this->getPHP().' '.$this->composerFile.' remove '.$packageName;
78
        $command .= ' --no-progress --no-scripts --ignore-platform-reqs --profile --no-ansi --no-interaction -d ';
79
        $command .= $this->workingDir.' 2>&1';
80
        log_info($command);
81
82
        // Execute command
83
        $this->runCommand($command);
84
85
        return true;
86
    }
87
88
    /**
89
     * Run command