@@ -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) { |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | public function build($stub) |
| 224 | 224 | { |
| 225 | 225 | $stub = $this->getStub($stub); |
| 226 | - if($stub) { |
|
| 226 | + if ($stub) { |
|
| 227 | 227 | return $this->template |
| 228 | 228 | ->render( |
| 229 | 229 | $this->getStub($stub), |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | if (starts_with($method, 'build')) { |
| 241 | 241 | if (str_contains($method, "Model")) { |
| 242 | 242 | $path = app_path($this->model->name); |
| 243 | - if($this->files->exists($path)) { |
|
| 243 | + if ($this->files->exists($path)) { |
|
| 244 | 244 | $this->messages[] = "File {$this->model->name} already exists."; |
| 245 | 245 | return $this; |
| 246 | 246 | } |
@@ -254,13 +254,13 @@ discard block |
||
| 254 | 254 | $path = app_path(); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - if($this->files->exists($path)) { |
|
| 257 | + if ($this->files->exists($path)) { |
|
| 258 | 258 | $this->messages[] = "File {$this->model->name}Controller already exists."; |
| 259 | 259 | return $this; |
| 260 | 260 | } |
| 261 | 261 | $target = substr($method, 5); |
| 262 | 262 | $content = $this->build($target); |
| 263 | - if($content) { |
|
| 263 | + if ($content) { |
|
| 264 | 264 | $this->files->put("$path.php", $content); |
| 265 | 265 | } else { |
| 266 | 266 | $this->messages[] = "File stub $target not found."; |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | protected function getStub($stub) |
| 274 | 274 | { |
| 275 | - if($this->files->exists(app_path("Scaffold/stubs/$stub.stub"))) { |
|
| 275 | + if ($this->files->exists(app_path("Scaffold/stubs/$stub.stub"))) { |
|
| 276 | 276 | return $this->files->get(app_path("Scaffold/stubs/$stub.stub")); |
| 277 | 277 | } else { |
| 278 | 278 | return false; |