Skip to content

Commit 1e46a0b

Browse files
committed
Resolve issues identified by PHPStorm
1 parent 21f8a0a commit 1e46a0b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
121121
);
122122

123123
return Cli::RETURN_SUCCESS;
124-
} else {
125-
$output->writeln('<info>' . 'There is no sample data for current set of modules.' . '</info>');
126-
127-
return Cli::RETURN_FAILURE;
128124
}
125+
126+
$output->writeln('<info>' . 'There is no sample data for current set of modules.' . '</info>');
127+
128+
return Cli::RETURN_FAILURE;
129129
}
130130

131131
/**

app/code/Magento/SampleData/Test/Unit/Console/Command/SampleDataDeployCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function processDataProvider(): array
149149
*/
150150
public function testExecuteWithException(): void
151151
{
152-
$this->expectException(\Exception::class);
152+
$this->expectException(Exception::class);
153153
$this->expectExceptionMessage(
154154
'Error in writing Auth file path/to/auth.json. Please check permissions for writing.'
155155
);
@@ -189,8 +189,8 @@ private function createCommandTester(): CommandTester
189189
}
190190

191191
/**
192-
* @param $sampleDataPackages
193-
* @param $pathToComposerJson
192+
* @param array $sampleDataPackages
193+
* @param string $pathToComposerJson
194194
* @return array
195195
*/
196196
protected function expectedComposerArgumentsSampleDataCommands(
@@ -211,7 +211,7 @@ protected function expectedComposerArgumentsSampleDataCommands(
211211
*/
212212
private function packageVersionStrings(array $sampleDataPackages): array
213213
{
214-
array_walk($sampleDataPackages, function (&$v, $k) {
214+
array_walk($sampleDataPackages, static function (&$v, $k) {
215215
$v = "$k:$v";
216216
});
217217

0 commit comments

Comments
 (0)