Skip to content

Commit 87aa45b

Browse files
committed
[TypeDeclaration] Skip has parent method on AddParamFromDimFetchKeyUseRector
1 parent d52149d commit 87aa45b

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamFromDimFetchKeyUseRector\Fixture;
4+
5+
use Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamFromDimFetchKeyUseRector\Source\SomeParentMethod;
6+
7+
final class SkipHasParentMethod extends SomeParentMethod
8+
{
9+
public function process($key)
10+
{
11+
$items = [
12+
'first' => 'Firstitem',
13+
'second' => 'Seconditem',
14+
];
15+
16+
return $items[$key];
17+
}
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamFromDimFetchKeyUseRector\Source;
6+
7+
class SomeParentMethod
8+
{
9+
public function process($key)
10+
{
11+
}
12+
}

0 commit comments

Comments
 (0)