Code Duplication    Length = 14-14 lines in 2 locations

src/DbDumper.php 2 locations

@@ 169-182 (lines=14) @@
166
     *
167
     * @throws \Spatie\DbDumper\Exceptions\CannotSetParameter
168
     */
169
    public function includeTables($includeTables)
170
    {
171
        if (! empty($this->excludeTables)) {
172
            throw CannotSetParameter::conflictingParameters('includeTables', 'excludeTables');
173
        }
174
175
        if (! is_array($includeTables)) {
176
            $includeTables = explode(', ', $includeTables);
177
        }
178
179
        $this->includeTables = $includeTables;
180
181
        return $this;
182
    }
183
184
    /**
185
     * @param string|array $excludeTables
@@ 191-204 (lines=14) @@
188
     *
189
     * @throws \Spatie\DbDumper\Exceptions\CannotSetParameter
190
     */
191
    public function excludeTables($excludeTables)
192
    {
193
        if (! empty($this->includeTables)) {
194
            throw CannotSetParameter::conflictingParameters('excludeTables', 'includeTables');
195
        }
196
197
        if (! is_array($excludeTables)) {
198
            $excludeTables = explode(', ', $excludeTables);
199
        }
200
201
        $this->excludeTables = $excludeTables;
202
203
        return $this;
204
    }
205
206
    /**
207
     * @param string $extraOption