@@ -7,30 +7,30 @@ |
||
7 | 7 | |
8 | 8 | class MigrationCreator extends MC |
9 | 9 | { |
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 | - |
|
26 | - protected function getPath($name, $path) |
|
27 | - { |
|
28 | - $path = $path.'/'.date('Y').'/'.date('m'); |
|
29 | - |
|
30 | - if (! $this->files->exists($path)) { |
|
31 | - $this->files->makeDirectory($path, 0775, true); |
|
32 | - } |
|
33 | - |
|
34 | - return $path.'/'.$this->getDatePrefix().'_'.$name.'.php'; |
|
35 | - } |
|
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 | + |
|
26 | + protected function getPath($name, $path) |
|
27 | + { |
|
28 | + $path = $path.'/'.date('Y').'/'.date('m'); |
|
29 | + |
|
30 | + if (! $this->files->exists($path)) { |
|
31 | + $this->files->makeDirectory($path, 0775, true); |
|
32 | + } |
|
33 | + |
|
34 | + return $path.'/'.$this->getDatePrefix().'_'.$name.'.php'; |
|
35 | + } |
|
36 | 36 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | protected function ensureMigrationDoesntAlreadyExist($name, $migrationPath = null) |
11 | 11 | { |
12 | - if (! empty($migrationPath)) { |
|
12 | + if ( ! empty($migrationPath)) { |
|
13 | 13 | $migrationPath = $migrationPath.'/'.date('Y').'/'.date('m'); |
14 | 14 | $migrationFiles = $this->files->glob($migrationPath.'/*.php'); |
15 | 15 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | $path = $path.'/'.date('Y').'/'.date('m'); |
29 | 29 | |
30 | - if (! $this->files->exists($path)) { |
|
30 | + if ( ! $this->files->exists($path)) { |
|
31 | 31 | $this->files->makeDirectory($path, 0775, true); |
32 | 32 | } |
33 | 33 |