Skip to content

Commit 074fa8f

Browse files
committed
fix psalm issue
1 parent 91729cf commit 074fa8f

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

src/Commands/MakeThemeCommand.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ protected function askCssFramework()
120120
$cssFramework = $this->choice(
121121
'Select CSS Framework',
122122
$options,
123-
$default = $options[0],
124-
$maxAttempts = null,
125-
$allowMultipleSelections = false
123+
$_default = $options[0],
124+
$_maxAttempts = null,
125+
$_allowMultipleSelections = false
126126
);
127127

128128
return $cssFramework;
@@ -139,9 +139,9 @@ protected function askJsFramework()
139139
$jsFramework = $this->choice(
140140
'Select Javascript Framework',
141141
$options,
142-
$options[0], // Default value
143-
$maxAttempts = null,
144-
$allowMultipleSelections = false
142+
$_default = $options[0], // Default value
143+
$_maxAttempts = null,
144+
$_allowMultipleSelections = false
145145
);
146146

147147
return $jsFramework;
@@ -158,9 +158,9 @@ public function askAuthScaffolding()
158158
$authScaffolding = $this->choice(
159159
'Publish Auth Scaffolding',
160160
$options,
161-
$default = $options[0],
162-
$maxAttempts = null,
163-
$allowMultipleSelections = false
161+
$_default = $options[0],
162+
$_maxAttempts = null,
163+
$_allowMultipleSelections = false
164164
);
165165

166166
return $authScaffolding;

src/Presets/Traits/HandleFiles.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ protected function ensureDirectoryExists(string $path, int $mode = 0755, bool $r
2121
}
2222
}
2323

24-
protected function replaceInFile(string $search, string $replace, string $path): int | false
24+
protected function replaceInFile(string $search, string $replace, string $path): int|bool
2525
{
2626
return file_put_contents($path, str_replace($search, $replace, file_get_contents($path)));
2727
}
2828

29-
public function createFile(string $path, string $content = ''): int | false
29+
public function createFile(string $path, string $content = ''): int|bool
3030
{
3131
return file_put_contents($path, $content);
3232
}
3333

34-
public function append(string $path, string $data): int | false
34+
public function append(string $path, string $data): int|bool
3535
{
3636
return file_put_contents($path, $data, FILE_APPEND);
3737
}

src/Presets/Traits/PresetTrait.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Qirolab\Theme\Presets\Traits;
44

5-
use Qirolab\Theme\Presets\PresetExport;
65
use Qirolab\Theme\Presets\Vite\VitePresetExport;
76
use Qirolab\Theme\Theme;
87

@@ -12,11 +11,11 @@ trait PresetTrait
1211
use PackagesTrait;
1312

1413
/**
15-
* @var PresetExport|VitePresetExport
14+
* @var VitePresetExport
1615
*/
1716
public $exporter;
1817

19-
public function __construct(PresetExport | VitePresetExport $exporter)
18+
public function __construct(VitePresetExport $exporter)
2019
{
2120
$this->exporter = $exporter;
2221
}

src/Presets/Vite/VitePresetExport.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function exportViteConfig()
9292

9393
$themePath = $this->relativeThemePath($this->theme);
9494

95-
$configData = file_get_contents($this->stubPath('vite.config.js')) ?? '';
95+
$configData = file_get_contents($this->stubPath('vite.config.js'));
9696
$configData = str_replace('%theme_path%', $themePath.DIRECTORY_SEPARATOR, $configData);
9797

9898
if ($this->cssPreset()) {

0 commit comments

Comments
 (0)