Skip to content

Commit e3953e2

Browse files
committed
Skip rector rules
- AssertFuncCallToPHPUnitAssertRector::class - FunctionLikeToFirstClassCallableRector::class
1 parent 5176407 commit e3953e2

File tree

12 files changed

+19
-17
lines changed

12 files changed

+19
-17
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
1818
use Rector\PHPUnit\CodeQuality\Rector\Class_\NarrowUnusedSetUpDefinedPropertyRector;
1919
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
20+
use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector;
2021
use Rector\PHPUnit\Set\PHPUnitSetList;
2122
use Rector\Set\ValueObject\LevelSetList;
2223

@@ -40,5 +41,6 @@
4041
NullToStrictStringFuncCallArgRector::class,
4142
PreferPHPUnitThisCallRector::class,
4243
NarrowUnusedSetUpDefinedPropertyRector::class,
44+
AssertFuncCallToPHPUnitAssertRector::class,
4345
]);
4446
};

src/Command/ReleaseCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function selectProject(InputInterface $input, OutputInterface $output):
127127
$question = new Question('<info>Please enter the name of the project to release:</info> ');
128128
$question->setAutocompleterValues(array_keys($this->projects->all()));
129129
$question->setTrimmable(true);
130-
$question->setValidator(fn ($answer): Project => $this->projects->byName($answer));
130+
$question->setValidator($this->projects->byName(...));
131131
$question->setMaxAttempts(3);
132132

133133
$project = $helper->ask($input, $output, $question);
@@ -154,7 +154,7 @@ private function selectBranch(InputInterface $input, OutputInterface $output, Pr
154154
$default
155155
);
156156
$question->setTrimmable(true);
157-
$question->setValidator(static fn ($answer): Branch => $project->branch($answer));
157+
$question->setValidator($project->branch(...));
158158
$question->setMaxAttempts(3);
159159

160160
$branch = $helper->ask($input, $output, $question);

src/Domain/Value/Branch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function fromValues(string $name, array $config): self
6565
}
6666

6767
$phpExtensions = array_map(
68-
static fn (string $phpExtension): PhpExtension => PhpExtension::fromString($phpExtension),
68+
PhpExtension::fromString(...),
6969
$config['php_extensions']
7070
);
7171

src/Domain/Value/Changelog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function fromPullRequests(array $pullRequests, Tag $next, Tag $cur
6262

6363
$changelog = array_reduce(
6464
$changelogs,
65-
'array_merge_recursive',
65+
array_merge_recursive(...),
6666
[]
6767
);
6868

src/Github/Api/Comments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(private GithubClient $github, private ResultPagerInt
3636
public function all(Repository $repository, PullRequest $pullRequest, ?string $username = null): array
3737
{
3838
$comments = array_map(
39-
static fn (array $response): Comment => Comment::fromResponse($response),
39+
Comment::fromResponse(...),
4040
$this->githubPager->fetchAll($this->github->issues()->comments(), 'all', [
4141
$repository->username(),
4242
$repository->name(),

src/Github/Api/Commits.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(private GithubClient $github, private ResultPagerInt
3636
public function all(Repository $repository, PullRequest $pullRequest): array
3737
{
3838
return array_map(
39-
static fn (array $response): Commit => Commit::fromResponse($response),
39+
Commit::fromResponse(...),
4040
$this->githubPager->fetchAll($this->github->pullRequest(), 'commits', [
4141
$repository->username(),
4242
$repository->name(),

src/Github/Api/Hooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(private GithubClient $github)
3232
public function all(Repository $repository): array
3333
{
3434
return array_map(
35-
static fn (array $response): Hook => Hook::fromResponse($response),
35+
Hook::fromResponse(...),
3636
$this->github->repo()->hooks()->all($repository->username(), $repository->name())
3737
);
3838
}

src/Github/Api/Labels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(private GithubClient $github)
3232
public function all(Repository $repository): array
3333
{
3434
return array_map(
35-
static fn (array $response): Label => Label::fromResponse($response),
35+
Label::fromResponse(...),
3636
$this->github->repo()->labels()->all($repository->username(), $repository->name())
3737
);
3838
}

tests/Util/Factory/Github/Response/CheckRunsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static function create(array $parameters = []): array
3030

3131
$response = [
3232
'check_runs' => array_map(
33-
static fn ($item): array => CheckRunFactory::create(),
33+
CheckRunFactory::create(...),
3434
range(0, $faker->numberBetween(2, 3))
3535
),
3636
];

0 commit comments

Comments
 (0)