Code Duplication    Length = 16-16 lines in 4 locations

src/Databases/MySql.php 2 locations

@@ 138-153 (lines=16) @@
135
     *
136
     * @return \Spatie\DbDumper\Databases\MySql
137
     */
138
    public function setTables($tables)
139
    {
140
        if (!empty($this->excludeTables)) {
141
            throw CannotSetParameter::conflictParameters('tables', 'excludeTables');
142
        }
143
144
        if (is_array($tables)) {
145
            $this->tables = $tables;
146
147
            return $this;
148
        }
149
150
        $this->tables = explode(' ', $tables);
151
152
        return $this;
153
    }
154
155
    /**
156
     * @param string/array $tables
@@ 160-175 (lines=16) @@
157
     *
158
     * @return \Spatie\DbDumper\Databases\MySql
159
     */
160
    public function setExcludeTables($tables)
161
    {
162
         if (!empty($this->tables)) {
163
            throw CannotSetParameter::conflictParameters('excludeTables', 'tables');
164
        }
165
166
        if (is_array($tables)) {
167
            $this->excludeTables = $tables;
168
169
            return $this;
170
        }
171
172
        $this->excludeTables = explode(' ', $tables);
173
174
        return $this;
175
    }
176
177
    /**
178
     * @return \Spatie\DbDumper\Databases\MySql

src/Databases/PostgreSql.php 2 locations

@@ 137-152 (lines=16) @@
134
     *
135
     * @return \Spatie\DbDumper\Databases\MySql
136
     */
137
    public function setTables($tables)
138
    {
139
        if (!empty($this->excludeTables)) {
140
            throw CannotSetParameter::conflictParameters('tables', 'excludeTables');
141
        }
142
143
        if (is_array($tables)) {
144
            $this->tables = $tables;
145
146
            return $this;
147
        }
148
149
        $this->tables = explode(' ', $tables);
150
151
        return $this;
152
    }
153
154
    /**
155
     * @param string/array $tables
@@ 159-174 (lines=16) @@
156
     *
157
     * @return \Spatie\DbDumper\Databases\MySql
158
     */
159
    public function setExcludeTables($tables)
160
    {
161
         if (!empty($this->tables)) {
162
            throw CannotSetParameter::conflictParameters('excludeTables', 'tables');
163
        }
164
165
        if (is_array($tables)) {
166
            $this->excludeTables = $tables;
167
168
            return $this;
169
        }
170
171
        $this->excludeTables = explode(' ', $tables);
172
173
        return $this;
174
    }
175
    /**
176
     * @return \Spatie\DbDumper\Databases\PostgreSql
177
     */