@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
| 8 | 8 | { |
| 9 | - const CONFIG_PATH = __DIR__ . '/../config/scaffold.php'; |
|
| 9 | + const CONFIG_PATH = __DIR__.'/../config/scaffold.php'; |
|
| 10 | 10 | |
| 11 | 11 | public function boot() |
| 12 | 12 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ->buildRequest() |
| 69 | 69 | ->buildApiController() |
| 70 | 70 | ->addRoutes(); |
| 71 | - foreach($scaffold->messages as $message) { |
|
| 71 | + foreach ($scaffold->messages as $message) { |
|
| 72 | 72 | $this->info($message); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | $files = $finder->files() |
| 82 | 82 | ->name('*table.php') |
| 83 | 83 | ->notName('2014*') |
| 84 | - ->in(database_path() . '/migrations'); |
|
| 84 | + ->in(database_path().'/migrations'); |
|
| 85 | 85 | |
| 86 | 86 | foreach ($files as $file) { |
| 87 | - $this->migrations[] = $file->getRealPath() ; |
|
| 87 | + $this->migrations[] = $file->getRealPath(); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $this->template = new \Mustache_Engine([ |
| 34 | 34 | 'delimiters' => '<% %>', |
| 35 | - 'escape' => function ($value) { |
|
| 35 | + 'escape' => function($value) { |
|
| 36 | 36 | return $value; //no escaping. |
| 37 | 37 | } |
| 38 | 38 | ]); |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getMigrationFiles($paths) |
| 92 | 92 | { |
| 93 | - return Collection::make($paths)->flatMap(function ($path) { |
|
| 93 | + return Collection::make($paths)->flatMap(function($path) { |
|
| 94 | 94 | return $this->files->glob($path.'/*_*.php'); |
| 95 | - })->filter()->sortBy(function ($file) { |
|
| 95 | + })->filter()->sortBy(function($file) { |
|
| 96 | 96 | return $this->getMigrationName($file); |
| 97 | - })->values()->keyBy(function ($file) { |
|
| 97 | + })->values()->keyBy(function($file) { |
|
| 98 | 98 | return $this->getMigrationName($file); |
| 99 | 99 | })->all(); |
| 100 | 100 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | { |
| 144 | 144 | $this->variables['modelName'] = $this->model->name; |
| 145 | 145 | |
| 146 | - $this->variables['modelVariable'] = "$" . Str::camel($this->model->name); |
|
| 146 | + $this->variables['modelVariable'] = "$".Str::camel($this->model->name); |
|
| 147 | 147 | |
| 148 | 148 | |
| 149 | 149 | if ($this->rules) { |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | if (starts_with($method, 'build')) { |
| 235 | 235 | if (str_contains($method, "Model")) { |
| 236 | 236 | $path = app_path($this->model->name); |
| 237 | - if($this->files->exists($path)) { |
|
| 237 | + if ($this->files->exists($path)) { |
|
| 238 | 238 | $this->messages[] = "File {$this->model->name} already exists."; |
| 239 | 239 | return $this; |
| 240 | 240 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $path = app_path(); |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | - if($this->files->exists($path)) { |
|
| 251 | + if ($this->files->exists($path)) { |
|
| 252 | 252 | $this->messages[] = "File {$this->model->name}Controller already exists."; |
| 253 | 253 | return $this; |
| 254 | 254 | } |