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