8000 [Validator] Add `@template` on CompoundConstraintTestCase` · symfony/symfony@618215a · GitHub
[go: up one dir, main page]

Skip to content

Commit 618215a

Browse files
[Validator] Add @template on CompoundConstraintTestCase`
1 parent b7fe7ef commit 618215a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Component/Validator/Test/CompoundConstraintTestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* A test case to ease testing Compound Constraints.
2828
*
2929
* @author Alexandre Daubois <alex.daubois@gmail.com>
30+
*
31+
* @template T of Compound
3032
*/
3133
abstract class CompoundConstraintTestCase extends TestCase
3234
{
@@ -119,5 +121,8 @@ protected function assertNoViolation(): void
119121
$this->assertSame(0, $violationsCount, \sprintf('No violation expected. Got %d.', $violationsCount));
120122
}
121123

124+
/**
125+
* @return T
126+
*/
122127
abstract protected function createCompound(): Compound;
123128
}

src/Symfony/Component/Validator/Tests/Test/CompoundConstraintTestCaseTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
use Symfony\Component\Validator\Test\CompoundConstraintTestCase;
2020
use Symfony\Component\Validator\Tests\Fixtures\DummyCompoundConstraint;
2121

22+
/**
23+
* @extends CompoundConstraintTestCase<DummyCompoundConstraint>
24+
*/
2225
class CompoundConstraintTestCaseTest extends CompoundConstraintTestCase
2326
{
2427
protected function createCompound(): Compound

0 commit comments

Comments
 (0)
0