Code Duplication    Length = 9-9 lines in 2 locations

src/Cli/Executable/OpenSSL.php 2 locations

@@ 203-211 (lines=9) @@
200
     * @return \phpbu\App\Cli\Executable\OpenSSL
201
     * @throws \phpbu\App\Exception
202
     */
203
    public function usePassword(string $password) : OpenSSL
204
    {
205
        if (self::MODE_CERT === $this->mode) {
206
            throw new Exception('Cert file already set');
207
        }
208
        $this->mode = self::MODE_PASS;
209
        $this->password = $password;
210
        return $this;
211
    }
212
213
    /**
214
     * Set algorithm to use.
@@ 251-259 (lines=9) @@
248
     * @return \phpbu\App\Cli\Executable\OpenSSL
249
     * @throws \phpbu\App\Exception
250
     */
251
    public function useSSLCert(string $file) : OpenSSL
252
    {
253
        if (self::MODE_PASS === $this->mode) {
254
            throw new Exception('Password already set');
255
        }
256
        $this->mode = self::MODE_CERT;
257
        $this->certFile = $file;
258
        return $this;
259
    }
260
261
    /**
262
     * OpenSSL CommandLine generator.