Skip to content

Commit d72cb14

Browse files
committed
[TypeDeclaration] Handle with other method from parent on KnownMagicClassMethodTypeRector
1 parent 6016355 commit d72cb14

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector\Fixture;
4+
5+
use Rector\Tests\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector\Source\ParentClassWithOtherMethod;
6+
7+
final class WithOtherMethodFromParent extends ParentClassWithOtherMethod
8+
{
9+
public function __invoke()
10+
{
11+
}
12+
13+
public function __call($method, $args)
14+
{
15+
}
16+
}
17+
18+
?>
19+
-----
20+
<?php
21+
22+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector\Fixture;
23+
24+
use Rector\Tests\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector\Source\ParentClassWithOtherMethod;
25+
26+
final class WithOtherMethodFromParent extends ParentClassWithOtherMethod
27+
{
28+
public function __invoke()
29+
{
30+
}
31+
32+
public function __call(string $method, array $args)
33+
{
34+
}
35+
}
36+
37+
?>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector\Source;
4+
5+
abstract class ParentClassWithOtherMethod
6+
{
7+
public function __invoke()
8+
{
9+
}
10+
}

0 commit comments

Comments
 (0)