Code Duplication    Length = 15-17 lines in 2 locations

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

@@ 70-84 (lines=15) @@
67
     * @param string $packageName format "foo/bar foo/bar2:1.0.0"
68
     * @return bool
69
     */
70
    public function execRequire($packageName)
71
    {
72
        set_time_limit(0);
73
        if (false === $this->init()) {
74
            return false;
75
        }
76
        // Build command
77
        $command = $this->pathPHP.' '.$this->composerFile.' require '.$packageName;
78
        $command .= ' --prefer-dist --no-progress --no-suggest --no-scripts --ignore-platform-reqs --profile --no-ansi --no-interaction -d ';
79
        $command .= $this->workingDir.' 2>&1';
80
        log_info($command);
81
        $this->runCommand($command);
82
83
        return true;
84
    }
85
86
    /**
87
     * This function to remove a plugin by composer remove
@@ 92-108 (lines=17) @@
89
     * @param string $packageName format "foo/bar foo/bar2"
90
     * @return bool
91
     */
92
    public function execRemove($packageName)
93
    {
94
        set_time_limit(0);
95
        if (false === $this->init()) {
96
            return false;
97
        }
98
        // Build command
99
        $command = $this->pathPHP.' '.$this->composerFile.' remove '.$packageName;
100
        $command .= ' --no-progress --no-scripts --ignore-platform-reqs --profile --no-ansi --no-interaction -d ';
101
        $command .= $this->workingDir.' 2>&1';
102
        log_info($command);
103
104
        // Execute command
105
        $this->runCommand($command);
106
107
        return true;
108
    }
109
110
    /**
111
     * Run command