Skip to content

Commit 3f9048a

Browse files
authored
fix: correct spacing and formatting in multiple files (#120)
1 parent e24e138 commit 3f9048a

5 files changed

Lines changed: 18 additions & 11 deletions

File tree

src/Console/Command/System/CheckCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,9 @@ private function formatSearchEngineVersion(array $info): string
553553
}
554554

555555
return 'Search Engine Available';
556-
} /**
556+
}
557+
558+
/**
557559
* Test Elasticsearch connection and return version info
558560
*
559561
* @param string $url
@@ -653,7 +655,9 @@ private function getDiskSpace(): string
653655
$usedPercent = round(($usedGB / $totalGB) * 100, 2);
654656

655657
return "$usedGB GB / $totalGB GB ($usedPercent%)";
656-
} /**
658+
}
659+
660+
/**
657661
* Safely get environment variable value
658662
*
659663
* @param string $name Environment variable name

src/Console/Command/Theme/BuildCommand.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private function processBuildThemes(
181181
$spinner = new Spinner(sprintf("Building %s (%d of %d) ...", $themeNameCyan, $currentTheme, $totalThemes));
182182
$success = false;
183183

184-
$spinner->spin(function() use ($validatedTheme, $io, $output, $isVerbose, &$successList, &$success) {
184+
$spinner->spin(function () use ($validatedTheme, $io, $output, $isVerbose, &$successList, &$success) {
185185
$success = $this->buildValidatedTheme($validatedTheme, $io, $output, $isVerbose, $successList);
186186
return true;
187187
});
@@ -428,7 +428,7 @@ private function getCachedEnvironmentVariables(): array
428428
*/
429429
private function sanitizeEnvironmentValue(string $name, string $value): ?string
430430
{
431-
return match($name) {
431+
return match ($name) {
432432
'COLUMNS', 'LINES' => $this->sanitizeNumericValue($value),
433433
'TERM' => $this->sanitizeTermValue($value),
434434
'CI', 'GITHUB_ACTIONS', 'GITLAB_CI' => $this->sanitizeBooleanValue($value),
@@ -508,7 +508,7 @@ private function getServerVar(string $name): ?string
508508
private function setEnvVar(string $name, string $value): void
509509
{
510510
// Validate input parameters
511-
if (empty($name) ) {
511+
if (empty($name)) {
512512
return;
513513
}
514514

@@ -546,7 +546,9 @@ private function clearEnvironmentCache(): void
546546
{
547547
// Reset our secure storage
548548
$this->secureEnvStorage = [];
549-
} /**
549+
}
550+
551+
/**
550552
* Check if the current environment supports interactive terminal input
551553
*
552554
* @param OutputInterface $output

src/Console/Command/Theme/CleanCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ private function getCachedEnvironmentVariables(): array
575575
*/
576576
private function sanitizeEnvironmentValue(string $name, string $value): ?string
577577
{
578-
return match($name) {
578+
return match ($name) {
579579
'COLUMNS', 'LINES' => $this->sanitizeNumericValue($value),
580580
'TERM' => $this->sanitizeTermValue($value),
581581
'CI', 'GITHUB_ACTIONS', 'GITLAB_CI' => $this->sanitizeBooleanValue($value),
@@ -649,7 +649,7 @@ private function getServerVar(string $name): ?string
649649
*/
650650
private function setEnvVar(string $name, string $value): void
651651
{
652-
if (empty($name) ) {
652+
if (empty($name)) {
653653
return;
654654
}
655655

src/Service/NodePackageManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class NodePackageManager
1616
public function __construct(
1717
private readonly Shell $shell,
1818
private readonly FileDriver $fileDriver
19-
) {}
19+
) {
20+
}
2021

2122
/**
2223
* Install node modules in the specified directory

src/view/frontend/templates/inspector.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
?>
1313
<!-- MageForge Inspector Assets -->
14-
<link rel="stylesheet" type="text/css" href="<?= $block->escapeUrl($block->getCssUrl()) ?>" />
14+
<link rel="stylesheet" type="text/css" href="<?= $escaper->escapeUrl($block->getCssUrl()) ?>" />
1515

1616
<!-- Alpine.js Bootstrap (load only if not already present) -->
1717
<script>
@@ -41,7 +41,7 @@
4141
})();
4242
</script>
4343

44-
<script defer src="<?= $block->escapeUrl($block->getJsUrl()) ?>"></script>
44+
<script defer src="<?= $escaper->escapeUrl($block->getJsUrl()) ?>"></script>
4545

4646
<!-- Inspector Component Wrapper -->
4747
<div class="mageforge-inspector" x-data="mageforgeInspector"></div>

0 commit comments

Comments
 (0)