@@ -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 | |
@@ -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) |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | public static function generateKeyPair($keySize = 1024): RsaKeyPair |
| 23 | 23 | { |
| 24 | - if (self::$instance === null) |
|
| 25 | - self::$instance = new RsaGenerator(); |
|
| 24 | + if (self::$instance === null) { |
|
| 25 | + self::$instance = new RsaGenerator(); |
|
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | return self::$instance->generate($keySize); |
| 28 | 29 | } |