| @@ 317-332 (lines=16) @@ | ||
| 314 | * @throws \InvalidArgumentException |
|
| 315 | * @return void |
|
| 316 | */ |
|
| 317 | protected function verifyMigrationDirectory($path) |
|
| 318 | { |
|
| 319 | if (!is_dir($path)) { |
|
| 320 | throw new \InvalidArgumentException(sprintf( |
|
| 321 | 'Migration directory "%s" does not exist', |
|
| 322 | $path |
|
| 323 | )); |
|
| 324 | } |
|
| 325 | ||
| 326 | if (!is_writable($path)) { |
|
| 327 | throw new \InvalidArgumentException(sprintf( |
|
| 328 | 'Migration directory "%s" is not writable', |
|
| 329 | $path |
|
| 330 | )); |
|
| 331 | } |
|
| 332 | } |
|
| 333 | ||
| 334 | /** |
|
| 335 | * Verify that the seed directory exists and is writable. |
|
| @@ 341-356 (lines=16) @@ | ||
| 338 | * @throws \InvalidArgumentException |
|
| 339 | * @return void |
|
| 340 | */ |
|
| 341 | protected function verifySeedDirectory($path) |
|
| 342 | { |
|
| 343 | if (!is_dir($path)) { |
|
| 344 | throw new \InvalidArgumentException(sprintf( |
|
| 345 | 'Seed directory "%s" does not exist', |
|
| 346 | $path |
|
| 347 | )); |
|
| 348 | } |
|
| 349 | ||
| 350 | if (!is_writable($path)) { |
|
| 351 | throw new \InvalidArgumentException(sprintf( |
|
| 352 | 'Seed directory "%s" is not writable', |
|
| 353 | $path |
|
| 354 | )); |
|
| 355 | } |
|
| 356 | } |
|
| 357 | ||
| 358 | /** |
|
| 359 | * Returns the migration template filename. |
|