Skip to content

Commit 72ef5ca

Browse files
authored
add test fixture to skip default parameter value (#57)
* add test fixture to skip default parameter value * hotfix SkipDefault.php
1 parent 9eeb9ae commit 72ef5ca

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Rector\TypePerfect\Tests\Rules\NarrowPublicClassMethodParamTypeRule\Fixture;
6+
7+
final class SkipDefault
8+
{
9+
public function dontSetParamValue(
10+
string $Id = ''
11+
): bool
12+
{
13+
return true;
14+
}
15+
16+
static public function run(): void
17+
{
18+
$skipDefault = new SkipDefault();
19+
$skipDefault->dontSetParamValue();
20+
}
21+
}

tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function testRule(array $filePaths, array $expectedErrorsWithLines): void
2626

2727
public static function provideData(): Iterator
2828
{
29+
yield [[__DIR__ . '/Fixture/SkipDefault.php'], []];
2930
yield [[__DIR__ . '/Fixture/SkipResource.php'], []];
3031
yield [[__DIR__ . '/Fixture/SkipDateTimeMix.php'], []];
3132
yield [[__DIR__ . '/Fixture/SkipNonPublicClassMethod.php'], []];

0 commit comments

Comments
 (0)