Skip to content

Commit 2ca5570

Browse files
authored
Merge pull request #98 from o0h/fix-cs
Fix cs/stan
2 parents e269788 + a5cbaf9 commit 2ca5570

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tests/unit/Differ/DiffCollectorTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getDiffFiles(string $baseCommit, string $headCommit): array
124124
* @param bool $includeNonAstChanged whether to include non AST-changed PhpDiffs
125125
* @param GitInterface $git the GitInterface instance
126126
*/
127-
#[DataProvider('getPhpDiffsAstChangedProvider')]
127+
#[DataProvider('provideGetPhpDiffsAstChangedCases')]
128128
public function testGetPhpDiffsAstChanged(int $expectCount, bool $includeNonAstChanged, GitInterface $git, DiffFactory $diffFactory): void
129129
{
130130
$subject = $this->getSubject(git: $git, diffFactory: $diffFactory);
@@ -135,7 +135,10 @@ public function testGetPhpDiffsAstChanged(int $expectCount, bool $includeNonAstC
135135
$this->assertCount($expectCount, $actual);
136136
}
137137

138-
public static function getPhpDiffsAstChangedProvider(): \Generator
138+
/**
139+
* @return iterable<array{int, bool, GitInterface, DiffFactory}>
140+
*/
141+
public static function provideGetPhpDiffsAstChangedCases(): iterable
139142
{
140143
$git = new class extends DummyGit {
141144
public function getDiffFiles(string $baseCommit, string $headCommit): array

tests/unit/Differ/DiffFactoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testCreateForNonPhp(): void
3131
$this->assertSame($status, $diff->status);
3232
}
3333

34-
#[DataProvider('createForPhpProvider')]
34+
#[DataProvider('provideCreateForPhpCases')]
3535
public function testCreateForPhp(GitStatus $gitStatus, ?string $expectedBase, ?string $expectedHead): void
3636
{
3737
$git = new class extends DummyGit {
@@ -56,7 +56,10 @@ public function get(string $source): string
5656
$this->assertSame($expectedHead, $actual->head);
5757
}
5858

59-
public static function createForPhpProvider(): \Generator
59+
/**
60+
* @return iterable<array{GitStatus, ?string, ?string}>
61+
*/
62+
public static function provideCreateForPhpCases(): iterable
6063
{
6164
yield 'ADDED' => [GitStatus::ADDED, null, '<?php $hash = \'commit2\'; $path = \'a.php\';'];
6265

0 commit comments

Comments
 (0)