mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 16:27:23 +01:00
Code quality improvements
This commit is contained in:
@ -40,7 +40,7 @@ final class Coverage implements AddsOutput, HandlesArguments
|
||||
/**
|
||||
* Creates a new Plugin instance.
|
||||
*/
|
||||
public function __construct(private OutputInterface $output)
|
||||
public function __construct(private readonly OutputInterface $output)
|
||||
{
|
||||
// ..
|
||||
}
|
||||
@ -52,7 +52,10 @@ final class Coverage implements AddsOutput, HandlesArguments
|
||||
{
|
||||
$arguments = [...[''], ...array_values(array_filter($originals, function ($original): bool {
|
||||
foreach ([self::COVERAGE_OPTION, self::MIN_OPTION] as $option) {
|
||||
if ($original === sprintf('--%s', $option) || Str::startsWith($original, sprintf('--%s=', $option))) {
|
||||
if ($original === sprintf('--%s', $option)) {
|
||||
return true;
|
||||
}
|
||||
if (Str::startsWith($original, sprintf('--%s=', $option))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user