Code Duplication    Length = 16-16 lines in 2 locations

src/Phinx/Console/Command/AbstractCommand.php 2 locations

@@ 305-320 (lines=16) @@
302
     * @throws \InvalidArgumentException
303
     * @return void
304
     */
305
    protected function verifyMigrationDirectory($path)
306
    {
307
        if (!is_dir($path)) {
308
            throw new \InvalidArgumentException(sprintf(
309
                'Migration directory "%s" does not exist',
310
                $path
311
            ));
312
        }
313
314
        if (!is_writable($path)) {
315
            throw new \InvalidArgumentException(sprintf(
316
                'Migration directory "%s" is not writable',
317
                $path
318
            ));
319
        }
320
    }
321
322
    /**
323
     * Verify that the seed directory exists and is writable.
@@ 329-344 (lines=16) @@
326
     * @throws \InvalidArgumentException
327
     * @return void
328
     */
329
    protected function verifySeedDirectory($path)
330
    {
331
        if (!is_dir($path)) {
332
            throw new \InvalidArgumentException(sprintf(
333
                'Seed directory "%s" does not exist',
334
                $path
335
            ));
336
        }
337
338
        if (!is_writable($path)) {
339
            throw new \InvalidArgumentException(sprintf(
340
                'Seed directory "%s" is not writable',
341
                $path
342
            ));
343
        }
344
    }
345
346
    /**
347
     * Returns the migration template filename.