@@ -59,8 +59,9 @@ |
||
59 | 59 | { |
60 | 60 | return once(function () { |
61 | 61 | $option = $this->option('sync'); |
62 | - if ($option !== null) |
|
63 | - $option = (bool)$option; |
|
62 | + if ($option !== null) { |
|
63 | + $option = (bool)$option; |
|
64 | + } |
|
64 | 65 | |
65 | 66 | return $option === null ? $this->confirm('Should the job run Synchronously?', false) : $option; |
66 | 67 | }); |
@@ -71,8 +71,9 @@ |
||
71 | 71 | { |
72 | 72 | return once(function () { |
73 | 73 | $option = $this->option('mongo'); |
74 | - if ($option !== null) |
|
75 | - $option = (bool)$option; |
|
74 | + if ($option !== null) { |
|
75 | + $option = (bool)$option; |
|
76 | + } |
|
76 | 77 | |
77 | 78 | return $option === null ? $this->confirm('Is this migration for a mongodb database?', false) : $option; |
78 | 79 | }); |
@@ -231,8 +231,9 @@ |
||
231 | 231 | $splittedInCapsName = preg_split('/(?=[A-Z])/', $string); |
232 | 232 | $i = 0; |
233 | 233 | foreach ($splittedInCapsName as $word) { |
234 | - if ($i !== 0) |
|
235 | - $splittedString = $splittedString . $word . '_'; |
|
234 | + if ($i !== 0) { |
|
235 | + $splittedString = $splittedString . $word . '_'; |
|
236 | + } |
|
236 | 237 | $i++; |
237 | 238 | } |
238 | 239 |
@@ -69,8 +69,9 @@ |
||
69 | 69 | { |
70 | 70 | $type = $this->getType(); |
71 | 71 | |
72 | - if (in_array($type, $this->types)) |
|
73 | - return "$type-test.stub"; |
|
72 | + if (in_array($type, $this->types)) { |
|
73 | + return "$type-test.stub"; |
|
74 | + } |
|
74 | 75 | |
75 | 76 | throw new Exception("Test type not supported"); |
76 | 77 | } |
@@ -36,8 +36,9 @@ |
||
36 | 36 | protected function getFirstDispatchedEvent(?string $class): ResourceGenerationContract |
37 | 37 | { |
38 | 38 | $events = $this->getDispatchedEvents($class); |
39 | - if (empty($events)) |
|
40 | - return null; |
|
39 | + if (empty($events)) { |
|
40 | + return null; |
|
41 | + } |
|
41 | 42 | return $events[0]; |
42 | 43 | } |
43 | 44 | } |
@@ -59,8 +59,9 @@ |
||
59 | 59 | protected function alterOptions($options) |
60 | 60 | { |
61 | 61 | $options['module'] = Str::studly($this->moduleName); |
62 | - if ($this->overwrite) |
|
63 | - $options['--overwrite'] = null; |
|
62 | + if ($this->overwrite) { |
|
63 | + $options['--overwrite'] = null; |
|
64 | + } |
|
64 | 65 | return $options; |
65 | 66 | } |
66 | 67 |
@@ -29,8 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | public function handle(ResourceGenerationContract $event) |
31 | 31 | { |
32 | - if (file_exists($event->getFilePath())) |
|
33 | - unlink($event->getFilePath()); |
|
32 | + if (file_exists($event->getFilePath())) { |
|
33 | + unlink($event->getFilePath()); |
|
34 | + } |
|
34 | 35 | |
35 | 36 | (new FileGenerator( |
36 | 37 | $event->getFilePath(), |
@@ -87,11 +87,12 @@ |
||
87 | 87 | |
88 | 88 | public function __call($name, $arguments) |
89 | 89 | { |
90 | - if (Str::startsWith($name, 'add')) |
|
91 | - $this->pipeline[] = [ |
|
90 | + if (Str::startsWith($name, 'add')) { |
|
91 | + $this->pipeline[] = [ |
|
92 | 92 | "name" => Str::replaceFirst('add', '', $name), |
93 | 93 | "arguments" => $arguments |
94 | 94 | ]; |
95 | + } |
|
95 | 96 | |
96 | 97 | } |
97 | 98 |
@@ -80,8 +80,9 @@ discard block |
||
80 | 80 | |
81 | 81 | $this->beforeGeneration(); |
82 | 82 | |
83 | - if ($this->event === null) |
|
84 | - throw new Exception("No Generator event specified on " . static::class); |
|
83 | + if ($this->event === null) { |
|
84 | + throw new Exception("No Generator event specified on " . static::class); |
|
85 | + } |
|
85 | 86 | |
86 | 87 | event(new $this->event($path, $stub)); |
87 | 88 | $this->info("Created : {$path}"); |
@@ -261,8 +262,9 @@ discard block |
||
261 | 262 | public function __call($method, $parameters) |
262 | 263 | { |
263 | 264 | $key = str_replace('get', '', $method); |
264 | - if (array_key_exists(strtolower($method), $this->optionData)) |
|
265 | - return $this->optionData[$key]; |
|
265 | + if (array_key_exists(strtolower($method), $this->optionData)) { |
|
266 | + return $this->optionData[$key]; |
|
267 | + } |
|
266 | 268 | } |
267 | 269 | |
268 | 270 | protected function handleOverwriteOption($shortcut, $type, $question, $default) |