Skip to content

Commit c14dee1

Browse files
committed
more autowire
1 parent dfbffe5 commit c14dee1

8 files changed

+14
-36
lines changed

conf/config.neon

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,42 +1286,6 @@ services:
12861286
tags:
12871287
- phpstan.dynamicStaticMethodThrowTypeExtension
12881288

1289-
-
1290-
class: PHPStan\Type\Php\StrContainingTypeSpecifyingExtension
1291-
tags:
1292-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1293-
1294-
-
1295-
class: PHPStan\Type\Php\SimpleXMLElementConstructorThrowTypeExtension
1296-
tags:
1297-
- phpstan.dynamicStaticMethodThrowTypeExtension
1298-
1299-
-
1300-
class: PHPStan\Type\Php\StatDynamicReturnTypeExtension
1301-
tags:
1302-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1303-
- phpstan.broker.dynamicMethodReturnTypeExtension
1304-
1305-
-
1306-
class: PHPStan\Type\Php\MethodExistsTypeSpecifyingExtension
1307-
tags:
1308-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1309-
1310-
-
1311-
class: PHPStan\Type\Php\PropertyExistsTypeSpecifyingExtension
1312-
tags:
1313-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1314-
1315-
-
1316-
class: PHPStan\Type\Php\ReflectionClassIsSubclassOfTypeSpecifyingExtension
1317-
tags:
1318-
- phpstan.typeSpecifier.methodTypeSpecifyingExtension
1319-
1320-
-
1321-
class: PHPStan\Type\Php\SetTypeFunctionTypeSpecifyingExtension
1322-
tags:
1323-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1324-
13251289
-
13261290
class: PHPStan\Type\Php\VersionCompareFunctionDynamicReturnTypeExtension
13271291
arguments:

src/Type/Php/MethodExistsTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PHPStan\Analyser\TypeSpecifier;
1010
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1111
use PHPStan\Analyser\TypeSpecifierContext;
12+
use PHPStan\DependencyInjection\AutowiredService;
1213
use PHPStan\Reflection\FunctionReflection;
1314
use PHPStan\Type\Accessory\HasMethodType;
1415
use PHPStan\Type\ClassStringType;
@@ -20,6 +21,7 @@
2021
use PHPStan\Type\UnionType;
2122
use function count;
2223

24+
#[AutowiredService]
2325
final class MethodExistsTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2426
{
2527

src/Type/Php/PropertyExistsTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use PHPStan\Analyser\TypeSpecifier;
1212
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1313
use PHPStan\Analyser\TypeSpecifierContext;
14+
use PHPStan\DependencyInjection\AutowiredService;
1415
use PHPStan\Reflection\FunctionReflection;
1516
use PHPStan\Rules\Properties\PropertyReflectionFinder;
1617
use PHPStan\Type\Accessory\HasPropertyType;
@@ -21,6 +22,7 @@
2122
use PHPStan\Type\ObjectWithoutClassType;
2223
use function count;
2324

25+
#[AutowiredService]
2426
final class PropertyExistsTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2527
{
2628

src/Type/Php/ReflectionClassIsSubclassOfTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
use PHPStan\Analyser\TypeSpecifier;
99
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1010
use PHPStan\Analyser\TypeSpecifierContext;
11+
use PHPStan\DependencyInjection\AutowiredService;
1112
use PHPStan\Reflection\MethodReflection;
1213
use PHPStan\Type\Generic\GenericObjectType;
1314
use PHPStan\Type\MethodTypeSpecifyingExtension;
1415
use PHPStan\Type\ObjectWithoutClassType;
1516
use PHPStan\Type\TypeCombinator;
1617
use ReflectionClass;
1718

19+
#[AutowiredService]
1820
final class ReflectionClassIsSubclassOfTypeSpecifyingExtension implements MethodTypeSpecifyingExtension, TypeSpecifierAwareExtension
1921
{
2022

src/Type/Php/SetTypeFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use PHPStan\Analyser\TypeSpecifier;
99
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1010
use PHPStan\Analyser\TypeSpecifierContext;
11+
use PHPStan\DependencyInjection\AutowiredService;
1112
use PHPStan\Reflection\FunctionReflection;
1213
use PHPStan\Type\ErrorType;
1314
use PHPStan\Type\FunctionTypeSpecifyingExtension;
@@ -18,6 +19,7 @@
1819
use function count;
1920
use function strtolower;
2021

22+
#[AutowiredService]
2123
final class SetTypeFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2224
{
2325

src/Type/Php/SimpleXMLElementConstructorThrowTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PhpParser\Node\Expr\StaticCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\MethodReflection;
89
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
910
use PHPStan\Type\NeverType;
@@ -14,6 +15,7 @@
1415
use function extension_loaded;
1516
use function libxml_use_internal_errors;
1617

18+
#[AutowiredService]
1719
final class SimpleXMLElementConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
1820
{
1921

src/Type/Php/StatDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PhpParser\Node\Expr\FuncCall;
66
use PhpParser\Node\Expr\MethodCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\FunctionReflection;
910
use PHPStan\Reflection\MethodReflection;
1011
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
@@ -18,6 +19,7 @@
1819
use SplFileObject;
1920
use function in_array;
2021

22+
#[AutowiredService]
2123
final class StatDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension, DynamicMethodReturnTypeExtension
2224
{
2325

src/Type/Php/StrContainingTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPStan\Analyser\TypeSpecifier;
1414
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1515
use PHPStan\Analyser\TypeSpecifierContext;
16+
use PHPStan\DependencyInjection\AutowiredService;
1617
use PHPStan\Reflection\FunctionReflection;
1718
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
1819
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
@@ -25,6 +26,7 @@
2526
use function count;
2627
use function strtolower;
2728

29+
#[AutowiredService]
2830
final class StrContainingTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2931
{
3032

0 commit comments

Comments
 (0)