Skip to content

Commit

Permalink
chore: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
aoekrz committed Jul 8, 2024
1 parent 0574ab5 commit a99381d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Classes/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
*/
protected function setFeatureStatus(string $features, bool $enabled): void
{
$features = array_map('trim', explode(',', $features));
$features = array_map(trim(...), explode(',', $features));
foreach ($features as $feature) {
$info = ($enabled) ? 'Activate' : 'Deactivate';
$this->showInfo($info . ' feature: ' . $feature);
Expand Down
2 changes: 2 additions & 0 deletions Tests/Unit/Command/AbstractCommandTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Aoe\FeatureFlag\Service\FeatureFlagService;
use Aoe\FeatureFlag\Tests\Unit\BaseTestCase;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

Expand Down Expand Up @@ -126,6 +127,7 @@ protected function runCommand(string $commandClass, string $commaSeparatedListOf
$this->callbackOnUpdateFeature($feature, $enabled);
});

/** @var Command $command */
$command = $this
->getMockBuilder($commandClass)
->setConstructorArgs([$featureFlagService])
Expand Down
5 changes: 1 addition & 4 deletions code-quality/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\Set\ValueObject\SetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;

use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;

Expand All @@ -33,8 +32,6 @@
PHPUnitSetList::PHPUNIT_CODE_QUALITY
])
->withSkip([
FinalizeClassesWithoutChildrenRector::class,
ChangeAndIfToEarlyReturnRector::class,
TypedPropertyFromStrictSetUpRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
Expand Down

0 comments on commit a99381d

Please sign in to comment.