Skip to content

Commit 2908da6

Browse files
committed
more autowire
1 parent b418b81 commit 2908da6

16 files changed

+30
-73
lines changed

conf/config.neon

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,12 +1066,6 @@ services:
10661066
-
10671067
class: PHPStan\Rules\Properties\PropertyDescriptor
10681068

1069-
-
1070-
class: PHPStan\Rules\Properties\PropertyReflectionFinder
1071-
1072-
-
1073-
class: PHPStan\Rules\Pure\FunctionPurityCheck
1074-
10751069
-
10761070
class: PHPStan\Rules\RuleLevelHelper
10771071
arguments:
@@ -1088,9 +1082,6 @@ services:
10881082
arguments:
10891083
reportExactLine: %featureToggles.reportPreciseLineForUnusedFunctionParameter%
10901084

1091-
-
1092-
class: PHPStan\Rules\TooWideTypehints\TooWideParameterOutTypeCheck
1093-
10941085
-
10951086
class: PHPStan\Type\FileTypeMapper
10961087
arguments:
@@ -1112,77 +1103,13 @@ services:
11121103
class: PHPStan\Type\TypeAliasResolverProvider
11131104
factory: PHPStan\Type\LazyTypeAliasResolverProvider
11141105

1115-
-
1116-
class: PHPStan\Type\BitwiseFlagHelper
1117-
11181106
-
11191107
class: PHPStan\Type\Php\CompactFunctionReturnTypeExtension
11201108
tags:
11211109
- phpstan.broker.dynamicFunctionReturnTypeExtension
11221110
arguments:
11231111
checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%
11241112

1125-
-
1126-
class: PHPStan\Type\Php\ConstantHelper
1127-
1128-
-
1129-
class: PHPStan\Type\Php\DateFunctionReturnTypeHelper
1130-
1131-
-
1132-
class: PHPStan\Type\Php\ArrayKeyExistsFunctionTypeSpecifyingExtension
1133-
tags:
1134-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1135-
1136-
-
1137-
class: PHPStan\Type\Php\AssertThrowTypeExtension
1138-
tags:
1139-
- phpstan.dynamicFunctionThrowTypeExtension
1140-
1141-
-
1142-
class: PHPStan\Type\Php\ArraySearchFunctionTypeSpecifyingExtension
1143-
tags:
1144-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1145-
1146-
-
1147-
class: PHPStan\Type\Php\ClosureBindDynamicReturnTypeExtension
1148-
tags:
1149-
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1150-
1151-
-
1152-
class: PHPStan\Type\Php\CountFunctionTypeSpecifyingExtension
1153-
tags:
1154-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1155-
1156-
-
1157-
class: PHPStan\Type\Php\ClosureBindToDynamicReturnTypeExtension
1158-
tags:
1159-
- phpstan.broker.dynamicMethodReturnTypeExtension
1160-
1161-
-
1162-
class: PHPStan\Type\Php\ClosureFromCallableDynamicReturnTypeExtension
1163-
tags:
1164-
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1165-
1166-
-
1167-
class: PHPStan\Type\Php\BackedEnumFromMethodDynamicReturnTypeExtension
1168-
tags:
1169-
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1170-
1171-
-
1172-
class: PHPStan\Type\Php\DateFormatMethodReturnTypeExtension
1173-
tags:
1174-
- phpstan.broker.dynamicMethodReturnTypeExtension
1175-
1176-
-
1177-
class: PHPStan\Type\Php\DateIntervalConstructorThrowTypeExtension
1178-
tags:
1179-
- phpstan.dynamicStaticMethodThrowTypeExtension
1180-
1181-
-
1182-
class: PHPStan\Type\Php\DateIntervalDynamicReturnTypeExtension
1183-
tags:
1184-
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1185-
11861113
-
11871114
class: PHPStan\Type\Php\DateTimeModifyReturnTypeExtension
11881115
tags:

src/Rules/Properties/PropertyReflectionFinder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
use PhpParser\Node\Scalar\String_;
88
use PhpParser\Node\VarLikeIdentifier;
99
use PHPStan\Analyser\Scope;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Type\Constant\ConstantStringType;
1112
use PHPStan\Type\Type;
1213
use function array_map;
1314
use function count;
1415

16+
#[AutowiredService]
1517
final class PropertyReflectionFinder
1618
{
1719

src/Rules/Pure/FunctionPurityCheck.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PhpParser\Node\Stmt;
88
use PHPStan\Analyser\ImpurePoint;
99
use PHPStan\Analyser\ThrowPoint;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Reflection\ExtendedMethodReflection;
1112
use PHPStan\Reflection\ExtendedParameterReflection;
1213
use PHPStan\Reflection\FunctionReflection;
@@ -20,6 +21,7 @@
2021
use function lcfirst;
2122
use function sprintf;
2223

24+
#[AutowiredService]
2325
final class FunctionPurityCheck
2426
{
2527

src/Rules/TooWideTypehints/TooWideParameterOutTypeCheck.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\Variable;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Node\ExecutionEndNode;
89
use PHPStan\Node\ReturnStatement;
910
use PHPStan\Reflection\ExtendedParameterReflection;
@@ -14,6 +15,7 @@
1415
use PHPStan\Type\VerbosityLevel;
1516
use function sprintf;
1617

18+
#[AutowiredService]
1719
final class TooWideParameterOutTypeCheck
1820
{
1921

src/Type/BitwiseFlagHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
use PhpParser\Node\Expr\ConstFetch;
88
use PhpParser\Node\Name\FullyQualified;
99
use PHPStan\Analyser\Scope;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Reflection\ReflectionProvider;
1112
use PHPStan\TrinaryLogic;
1213
use PHPStan\Type\Constant\ConstantIntegerType;
1314

15+
#[AutowiredService]
1416
final class BitwiseFlagHelper
1517
{
1618

src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PHPStan\Analyser\TypeSpecifier;
1313
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1414
use PHPStan\Analyser\TypeSpecifierContext;
15+
use PHPStan\DependencyInjection\AutowiredService;
1516
use PHPStan\Reflection\FunctionReflection;
1617
use PHPStan\Type\Accessory\HasOffsetType;
1718
use PHPStan\Type\Accessory\NonEmptyArrayType;
@@ -24,6 +25,7 @@
2425
use function count;
2526
use function in_array;
2627

28+
#[AutowiredService]
2729
final class ArrayKeyExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2830
{
2931

src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
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\Accessory\NonEmptyArrayType;
1314
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1415
use function strtolower;
1516

17+
#[AutowiredService]
1618
final class ArraySearchFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1719
{
1820

src/Type/Php/ClosureBindDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
use Closure;
66
use PhpParser\Node\Expr\StaticCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\MethodReflection;
910
use PHPStan\Type\ClosureType;
1011
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
1112
use PHPStan\Type\Type;
1213

14+
#[AutowiredService]
1315
final class ClosureBindDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
1416
{
1517

src/Type/Php/ClosureBindToDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
use Closure;
66
use PhpParser\Node\Expr\MethodCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\MethodReflection;
910
use PHPStan\Type\ClosureType;
1011
use PHPStan\Type\DynamicMethodReturnTypeExtension;
1112
use PHPStan\Type\Type;
1213

14+
#[AutowiredService]
1315
final class ClosureBindToDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
1416
{
1517

src/Type/Php/ClosureFromCallableDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Closure;
66
use PhpParser\Node\Expr\StaticCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\ExtendedParametersAcceptor;
910
use PHPStan\Reflection\MethodReflection;
1011
use PHPStan\Type\ClosureType;
@@ -14,6 +15,7 @@
1415
use PHPStan\Type\Type;
1516
use PHPStan\Type\TypeCombinator;
1617

18+
#[AutowiredService]
1719
final class ClosureFromCallableDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
1820
{
1921

0 commit comments

Comments
 (0)