Skip to content

Commit 5c1d279

Browse files
committed
Fix psalm issues
1 parent ae4975e commit 5c1d279

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Commands/MakeCommand.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class MakeCommand extends Command
4747
*
4848
* @var string
4949
*/
50-
protected $description = 'Generate a Laravel Livewire datatable class and view';
51-
50+
protected $description = 'Generate a Laravel Livewire datatable class and view.';
51+
5252
public function handle(): void
5353
{
5454
$this->parser = new ComponentParser(
@@ -74,7 +74,7 @@ public function handle(): void
7474
}
7575

7676
/**
77-
* @param false $force
77+
* @param bool $force
7878
*
7979
* @return false
8080
*/
@@ -96,11 +96,11 @@ protected function createClass(bool $force = false)
9696
}
9797

9898
/**
99-
* @param false $force
99+
* @param bool $force
100100
*
101101
* @return false|string|null
102102
*/
103-
protected function createView($force = false)
103+
protected function createView(bool $force = false)
104104
{
105105
if(! $this->option('view')) {
106106
return null;
@@ -139,16 +139,16 @@ public function classContents(): string
139139
if($this->model) {
140140
$template = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'table-with-model.stub');
141141

142-
$contents = preg_replace_array(
143-
['/\[namespace\]/', '/\[class\]/', '/\[model\]/', '/\[model_import\]/'],
142+
$contents = str_replace(
143+
['[namespace]', '[class]', '[model]', '[model_import]'],
144144
[$this->parser->classNamespace(), $this->parser->className(), $this->model, $this->getModelImport()],
145145
$template
146146
);
147147
} else {
148148
$template = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'table.stub');
149149

150-
$contents = preg_replace_array(
151-
['/\[namespace\]/', '/\[class\]/'],
150+
$contents = str_replace(
151+
['[namespace]', '[class]'],
152152
[$this->parser->classNamespace(), $this->parser->className()],
153153
$template
154154
);

0 commit comments

Comments
 (0)