Skip to content

Commit a42f487

Browse files
committed
Rector fixes
1 parent e17c81a commit a42f487

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
->withPhpSets()
1313
->withPreparedSets(
1414
deadCode: true,
15-
naming: true,
16-
codingStyle: true,
1715
codeQuality: true,
16+
codingStyle: true,
17+
naming: true,
1818
)
1919
->withAttributesSets()
2020
;

src/SymfonyConsoleWrapper.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ public function __invoke(InputInterface $input, OutputInterface $output): int
2323
{
2424
if ($this->testRunner instanceof ConfigurableTestRunnerInterface) {
2525
$config = $input->getOption('config');
26-
if (is_string($config) && !empty($config)) {
27-
$config = (string) $config;
26+
if (is_string($config) && ($config !== '' && $config !== '0')) {
2827
$this->testRunner->setConfig($config);
2928
}
3029

@@ -33,12 +32,12 @@ public function __invoke(InputInterface $input, OutputInterface $output): int
3332
}
3433

3534
$file = $input->getArgument('file');
36-
if (is_string($file) && !empty($file)) {
37-
$file = (string) $file;
38-
} else {
35+
if (!(is_string($file) && ($file !== '' && $file !== '0'))) {
3936
$output->writeln('<error>No file specified.</error>');
40-
return 1; // Error code for no file specified
37+
return 1;
38+
// Error code for no file specified
4139
}
40+
4241
return ($this->testRunner)($file);
4342
}
4443
}

0 commit comments

Comments
 (0)