Skip to content

Commit 37594eb

Browse files
rappasoftactions-user
authored andcommitted
Fix styling
1 parent 5c1d279 commit 37594eb

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/Commands/MakeCommand.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ public function handle(): void
5959

6060
$livewireMakeCommand = new LivewireMakeCommand();
6161

62-
if($livewireMakeCommand->isReservedClassName($name = $this->parser->className())) {
62+
if ($livewireMakeCommand->isReservedClassName($name = $this->parser->className())) {
6363
$this->line("<fg=red;options=bold>Class is reserved:</> {$name}");
64+
6465
return;
6566
}
6667

@@ -102,7 +103,7 @@ protected function createClass(bool $force = false)
102103
*/
103104
protected function createView(bool $force = false)
104105
{
105-
if(! $this->option('view')) {
106+
if (! $this->option('view')) {
106107
return null;
107108
}
108109

@@ -136,7 +137,7 @@ protected function ensureDirectoryExists($path): void
136137
*/
137138
public function classContents(): string
138139
{
139-
if($this->model) {
140+
if ($this->model) {
140141
$template = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'table-with-model.stub');
141142

142143
$contents = str_replace(
@@ -147,21 +148,24 @@ public function classContents(): string
147148
} else {
148149
$template = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'table.stub');
149150

150-
$contents = str_replace(
151+
$contents = str_replace(
151152
['[namespace]', '[class]'],
152153
[$this->parser->classNamespace(), $this->parser->className()],
153154
$template
154155
);
155156
}
156157

157-
if($this->viewPath) {
158-
$contents = Str::replaceLast("}\n", "
158+
if ($this->viewPath) {
159+
$contents = Str::replaceLast(
160+
"}\n",
161+
"
159162
public function rowView(): string
160163
{
161164
return '" . $this->getViewPathForRowView() . "';
162165
}
163166
}\n",
164-
$contents);
167+
$contents
168+
);
165169
}
166170

167171
return $contents;
@@ -188,11 +192,11 @@ public function viewContents()
188192
*/
189193
public function getModelImport(): string
190194
{
191-
if(File::exists(app_path('Models/' . $this->model . '.php'))) {
195+
if (File::exists(app_path('Models/' . $this->model . '.php'))) {
192196
return 'App\Models\\' . $this->model;
193197
}
194198

195-
if(File::exists(app_path($this->model . '.php'))) {
199+
if (File::exists(app_path($this->model . '.php'))) {
196200
return 'App\\' . $this->model;
197201
}
198202

0 commit comments

Comments
 (0)