Skip to content

Commit 9c65f09

Browse files
committed
refactor: remove unused filesystem dependency and update type casting
1 parent bb212eb commit 9c65f09

4 files changed

Lines changed: 2 additions & 244 deletions

File tree

.github/workflows/phpunit.yml

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/Console/Command/Theme/CopyFromVendorCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Laravel\Prompts\SearchPrompt;
99
use Magento\Framework\Console\Cli;
1010
use Magento\Framework\Filesystem\DirectoryList;
11-
use Magento\Framework\Filesystem;
1211
use Magento\Framework\Component\ComponentRegistrar;
1312
use Magento\Framework\Component\ComponentRegistrarInterface;
1413
use OpenForgeProject\MageForge\Console\Command\AbstractCommand;
@@ -25,7 +24,6 @@ class CopyFromVendorCommand extends AbstractCommand
2524
public function __construct(
2625
private readonly ThemeList $themeList,
2726
private readonly VendorFileMapper $vendorFileMapper,
28-
private readonly Filesystem $filesystem,
2927
private readonly DirectoryList $directoryList,
3028
private readonly ComponentRegistrarInterface $componentRegistrar
3129
) {
@@ -108,7 +106,7 @@ private function getThemeCode(InputInterface $input): string
108106

109107
$this->fixPromptEnvironment();
110108

111-
return search(
109+
return (string) search(
112110
label: 'Select target theme',
113111
options: fn (string $value) => array_filter(
114112
$options,

src/Service/VendorFileMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function mapToThemePath(string $sourcePath, string $themePath): string
4949
$pathInsideModule = substr($sourcePath, strlen($path) + 1);
5050

5151
// Remove view/frontend/ or view/base/ from the path
52-
$cleanPath = preg_replace('#^view/(frontend|base)/#', '', $pathInsideModule);
52+
$cleanPath = (string) preg_replace('#^view/(frontend|base)/#', '', $pathInsideModule);
5353

5454
return rtrim($themePath, '/') . '/' . $moduleName . '/' . ltrim($cleanPath, '/');
5555
}

src/Test/Unit/Service/VendorFileMapperTest.php

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)