Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | protected function ensureMigrationDoesntAlreadyExist($name, $migrationPath = null) |
||
11 | { |
||
12 | if (! empty($migrationPath)) { |
||
13 | $migrationPath = $migrationPath.'/'.date('Y').'/'.date('m'); |
||
14 | $migrationFiles = $this->files->glob($migrationPath.'/*.php'); |
||
15 | |||
16 | foreach ($migrationFiles as $migrationFile) { |
||
17 | $this->files->requireOnce($migrationFile); |
||
18 | } |
||
19 | } |
||
20 | |||
21 | if (class_exists($className = $this->getClassName($name))) { |
||
22 | throw new InvalidArgumentException("A {$className} class already exists."); |
||
23 | } |
||
24 | } |
||
25 | |||
37 |