Skip to content

Commit c98e95e

Browse files
committed
cs fixes
1 parent 0fae83e commit c98e95e

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/JsPackageManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(FileManager $fileManager)
3131
public function isInstalled(string $package): bool
3232
{
3333
$packageJson = $this->packageJson();
34-
$deps = \array_merge($packageJson['dependencies'] ?? [], $packageJson['devDependencies'] ?? []);
34+
$deps = array_merge($packageJson['dependencies'] ?? [], $packageJson['devDependencies'] ?? []);
3535

3636
return \array_key_exists($package, $deps);
3737
}

src/Maker/MakeScaffold.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
105105
while (true) {
106106
$name = $io->choice('Available scaffolds', array_combine(
107107
array_keys($scaffolds),
108-
array_map(fn (array $scaffold) => $scaffold['description'], $scaffolds)
108+
array_map(
109+
function (array $scaffold) {
110+
return $scaffold['description'];
111+
},
112+
$scaffolds
113+
)
109114
));
110115
$scaffold = $scaffolds[$name];
111116

@@ -116,19 +121,24 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
116121
if ($scaffold['dependents'] ?? []) {
117122
$io->text('This scaffold will also install the following scaffolds:');
118123
$io->newLine();
119-
$io->listing(\array_map(fn($s) => \sprintf('%s - %s', $s, $scaffolds[$s]['description']), $scaffold['dependents']));
124+
$io->listing(array_map(
125+
function ($s) use ($scaffolds) {
126+
return sprintf('%s - %s', $s, $scaffolds[$s]['description']);
127+
},
128+
$scaffold['dependents'])
129+
);
120130
}
121131

122132
if ($scaffold['packages'] ?? []) {
123133
$io->text('This scaffold will install the following composer packages:');
124134
$io->newLine();
125-
$io->listing(\array_keys($scaffold['packages']));
135+
$io->listing(array_keys($scaffold['packages']));
126136
}
127137

128138
if ($scaffold['js_packages'] ?? []) {
129139
$io->text('This scaffold will install the following node packages:');
130140
$io->newLine();
131-
$io->listing(\array_keys($scaffold['js_packages']));
141+
$io->listing(array_keys($scaffold['js_packages']));
132142
}
133143

134144
if (!$io->confirm("Would your like to create the \"{$name}\" scaffold?")) {

0 commit comments

Comments
 (0)