Skip to content

Commit 42eecea

Browse files
committed
Some renaming to generalize extension class names
1 parent bdf8ded commit 42eecea

6 files changed

+10
-10
lines changed

extension.neon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
services:
22
-
3-
class: PHPStan\Mockery\Reflection\AllowsMethodsClassReflectionExtension
3+
class: PHPStan\Mockery\Reflection\StubMethodsClassReflectionExtension
44
tags:
55
- phpstan.broker.methodsClassReflectionExtension
66

77
-
8-
class: PHPStan\Mockery\Type\AllowsDynamicReturnTypeExtension
8+
class: PHPStan\Mockery\Type\StubDynamicReturnTypeExtension
99
tags:
1010
- phpstan.broker.dynamicMethodReturnTypeExtension
1111

1212
-
13-
class: PHPStan\Mockery\Type\ExpectationAfterAllowsDynamicReturnTypeExtension
13+
class: PHPStan\Mockery\Type\ExpectationAfterStubDynamicReturnTypeExtension
1414
tags:
1515
- phpstan.broker.dynamicMethodReturnTypeExtension
1616

src/Mockery/Reflection/AllowsMethodReflection.php renamed to src/Mockery/Reflection/StubMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPStan\Reflection\MethodReflection;
88
use PHPStan\Reflection\TrivialParametersAcceptor;
99

10-
class AllowsMethodReflection implements MethodReflection
10+
class StubMethodReflection implements MethodReflection
1111
{
1212

1313
/** @var ClassReflection */

src/Mockery/Reflection/AllowsMethodsClassReflectionExtension.php renamed to src/Mockery/Reflection/StubMethodsClassReflectionExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPStan\Reflection\MethodReflection;
88
use PHPStan\Reflection\MethodsClassReflectionExtension;
99

10-
class AllowsMethodsClassReflectionExtension implements MethodsClassReflectionExtension
10+
class StubMethodsClassReflectionExtension implements MethodsClassReflectionExtension
1111
{
1212

1313
public function hasMethod(ClassReflection $classReflection, string $methodName): bool
@@ -17,7 +17,7 @@ public function hasMethod(ClassReflection $classReflection, string $methodName):
1717

1818
public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection
1919
{
20-
return new AllowsMethodReflection($classReflection, $methodName);
20+
return new StubMethodReflection($classReflection, $methodName);
2121
}
2222

2323
}

src/Mockery/Type/ExpectationAfterAllowsDynamicReturnTypeExtension.php renamed to src/Mockery/Type/ExpectationAfterStubDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PHPStan\Type\ObjectType;
1010
use PHPStan\Type\Type;
1111

12-
class ExpectationAfterAllowsDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
12+
class ExpectationAfterStubDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
1313
{
1414

1515
public function getClass(): string

src/Mockery/Type/AllowsDynamicReturnTypeExtension.php renamed to src/Mockery/Type/StubDynamicReturnTypeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use PHPStan\Type\TypeCombinator;
1414
use PHPStan\Type\TypeWithClassName;
1515

16-
class AllowsDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
16+
class StubDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
1717
{
1818

1919
public function getClass(): string
@@ -39,7 +39,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
3939
}
4040

4141
return TypeCombinator::intersect(
42-
new AllowsObjectType($mockedType->getClassName()),
42+
new StubObjectType($mockedType->getClassName()),
4343
new ObjectType(Allows::class)
4444
);
4545
}

src/Mockery/Type/AllowsObjectType.php renamed to src/Mockery/Type/StubObjectType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PHPStan\Type\ObjectType;
66

7-
class AllowsObjectType extends ObjectType
7+
class StubObjectType extends ObjectType
88
{
99

1010
}

0 commit comments

Comments
 (0)