rename php.inc to php

This commit is contained in:
Tomas Votruba 2018-05-31 14:02:38 +02:00
parent 09195aae13
commit 86d5bf7c8d
15 changed files with 21 additions and 21 deletions

View File

@ -82,11 +82,11 @@ final class NameTypeResolver implements PerNodeTypeResolverInterface
return [$name];
}
if (class_exists($classLikeReflection->getName())) {
// if (class_exists($classLikeReflection->getName())) {
$useTraits = array_values((array) class_uses($classLikeReflection->getName()));
} else {
$useTraits = [];
}
// } else {
// $useTraits = [];
// }
$implementedInterfaces = $this->smartClassReflector->resolveClassInterfaces($classLikeReflection);
$classParents = $this->smartClassReflector->resolveClassParents($classLikeReflection);

View File

@ -1,6 +1,6 @@
<?php
class SomeParentCallingClass extends \Rector\NodeTypeResolver\Tests\Source\AnotherClass // AnotherClass
class SomeParentCallingClass extends \Rector\NodeTypeResolver\Tests\Source\AnotherClass
{
public function createContainer()
{

View File

@ -28,26 +28,26 @@ final class MethodCallTypeResolverTest extends AbstractNodeTypeResolverTest
public function provideData(): Iterator
{
# on self call
yield [__DIR__ . '/MethodCallSource/OnSelfCall.php.inc', 0, ['SomeParentCallingClass', AnotherClass::class]];
yield [__DIR__ . '/MethodCallSource/OnSelfCall.php.inc', 1, ['SomeParentCallingClass', AnotherClass::class]];
yield [__DIR__ . '/MethodCallSource/OnSelfCall.php', 0, ['SomeParentCallingClass', AnotherClass::class]];
yield [__DIR__ . '/MethodCallSource/OnSelfCall.php', 1, ['SomeParentCallingClass', AnotherClass::class]];
# on method call
yield [__DIR__ . '/MethodCallSource/OnMethodCallCall.php.inc', 0, [
yield [__DIR__ . '/MethodCallSource/OnMethodCallCall.php', 0, [
'Rector\NodeTypeResolver\Tests\Source\AnotherClass',
]];
# on variable call
yield [__DIR__ . '/MethodCallSource/OnVariableCall.php.inc', 0, [
yield [__DIR__ . '/MethodCallSource/OnVariableCall.php', 0, [
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
# on property call
yield [__DIR__ . '/MethodCallSource/OnPropertyCall.php.inc', 0, [
yield [__DIR__ . '/MethodCallSource/OnPropertyCall.php', 0, [
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
# on magic class call
yield [__DIR__ . '/MethodCallSource/OnMagicClassCall.php.inc', 0, [
yield [__DIR__ . '/MethodCallSource/OnMagicClassCall.php', 0, [
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
# on trait method call
yield [__DIR__ . '/MethodCallSource/SomeClassWithTraitCall.php.inc', 0, [
yield [__DIR__ . '/MethodCallSource/SomeClassWithTraitCall.php', 0, [
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
}

View File

@ -36,40 +36,40 @@ final class NestedMethodCallTest extends AbstractNodeTypeResolverTest
{
# form chain method calls
yield [
__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php.inc', 0, 'addRule', [
__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php', 0, 'addRule', [
'Stub_Nette\Forms\Rules',
],
];
yield [__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php.inc', 1, 'addCondition', [
yield [__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php', 1, 'addCondition', [
'Stub_Nette\Forms\Controls\TextInput',
'Stub_Nette\Forms\Controls\TextArea',
]];
yield [__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php.inc', 2, 'addText', [
yield [__DIR__ . '/NestedMethodCallSource/FormChainMethodCalls.php', 2, 'addText', [
'Stub_Nette\Application\UI\Form',
'Stub_Nette\Forms\Form',
]];
# nested different method calls
yield [__DIR__ . '/NestedMethodCallSource/OnMethodCallCallDifferentType.php.inc', 0, 'getParameters', [
yield [__DIR__ . '/NestedMethodCallSource/OnMethodCallCallDifferentType.php', 0, 'getParameters', [
AnotherClass::class,
]];
yield [__DIR__ . '/NestedMethodCallSource/OnMethodCallCallDifferentType.php.inc', 1, 'createAnotherClass', [
yield [__DIR__ . '/NestedMethodCallSource/OnMethodCallCallDifferentType.php', 1, 'createAnotherClass', [
ClassWithFluentNonSelfReturn::class,
]];
# nested method calls
yield [
__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php.inc',
__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php',
0,
'getParameters',
[AnotherClass::class],
];
yield [
__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php.inc',
__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php',
1,
'callAndReturnSelf',
[AnotherClass::class],
];
# nested method calls
yield [__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php.inc', 2, 'createAnotherClass', [
yield [__DIR__ . '/NestedMethodCallSource/NestedMethodCalls.php', 2, 'createAnotherClass', [
ClassWithFluentNonSelfReturn::class,
]];
}