Code Duplication    Length = 10-11 lines in 2 locations

src/Backup/Source/Elasticdump.php 1 location

@@ 75-85 (lines=11) @@
72
     * @param  array $conf
73
     * @throws \phpbu\App\Exception
74
     */
75
    public function setup(array $conf = array())
76
    {
77
        $this->setupSourceData($conf);
78
79
        // environment settings
80
        $this->pathToElasticdump = Util\Arr::getValue($conf, 'pathToElasticdump');
81
82
        $this->host       = Util\Arr::getValue($conf, 'host', 'http://localhost:9200');
83
        $this->user       = Util\Arr::getValue($conf, 'user');
84
        $this->password   = Util\Arr::getValue($conf, 'password');
85
    }
86
87
    /**
88
     * Get index and type.

src/Backup/Source/XtraBackup.php 1 location

@@ 88-97 (lines=10) @@
85
     * @param  array $conf
86
     * @throws \phpbu\App\Exception
87
     */
88
    public function setup(array $conf = array())
89
    {
90
        $this->setupSourceData($conf);
91
92
        $this->pathToXtraBackup = Util\Arr::getValue($conf, 'pathToXtraBackup');
93
        $this->dataDir          = Util\Arr::getValue($conf, 'dataDir');
94
        $this->host             = Util\Arr::getValue($conf, 'host');
95
        $this->user             = Util\Arr::getValue($conf, 'user');
96
        $this->password         = Util\Arr::getValue($conf, 'password');
97
    }
98
99
    /**
100
     * Get tables and databases to backup.