Skip to content

Commit 634e7bc

Browse files
committed
More DynamicFunctionReturnTypeExtension converted to #[AutowiredService] attribute usage
1 parent 339a29d commit 634e7bc

File tree

42 files changed

+94
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+94
-208
lines changed

conf/config.neon

Lines changed: 12 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,200 +1135,42 @@ services:
11351135
class: PHPStan\Type\BitwiseFlagHelper
11361136

11371137
-
1138-
class: PHPStan\Type\Php\ArgumentBasedFunctionReturnTypeExtension
1139-
tags:
1140-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1141-
1142-
-
1143-
class: PHPStan\Type\Php\ArrayChangeKeyCaseFunctionReturnTypeExtension
1144-
tags:
1145-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1146-
1147-
-
1148-
class: PHPStan\Type\Php\ArrayIntersectKeyFunctionReturnTypeExtension
1149-
tags:
1150-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1151-
1152-
-
1153-
class: PHPStan\Type\Php\ArrayChunkFunctionReturnTypeExtension
1154-
tags:
1155-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1156-
1157-
-
1158-
class: PHPStan\Type\Php\ArrayColumnHelper
1159-
1160-
-
1161-
class: PHPStan\Type\Php\ArrayColumnFunctionReturnTypeExtension
1162-
tags:
1163-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1164-
1165-
-
1166-
class: PHPStan\Type\Php\ArrayCombineFunctionReturnTypeExtension
1167-
tags:
1168-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1169-
1170-
-
1171-
class: PHPStan\Type\Php\ArrayCurrentDynamicReturnTypeExtension
1172-
tags:
1173-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1174-
1175-
-
1176-
class: PHPStan\Type\Php\ArrayFillFunctionReturnTypeExtension
1177-
tags:
1178-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1179-
1180-
-
1181-
class: PHPStan\Type\Php\ArrayFillKeysFunctionReturnTypeExtension
1182-
tags:
1183-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1184-
1185-
-
1186-
class: PHPStan\Type\Php\ArrayFilterFunctionReturnTypeHelper
1187-
1188-
-
1189-
class: PHPStan\Type\Php\ArrayFilterFunctionReturnTypeExtension
1190-
tags:
1191-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1192-
1193-
-
1194-
class: PHPStan\Type\Php\ArrayFlipFunctionReturnTypeExtension
1195-
tags:
1196-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1197-
1198-
-
1199-
class: PHPStan\Type\Php\ArrayFindFunctionReturnTypeExtension
1138+
class: PHPStan\Type\Php\CompactFunctionReturnTypeExtension
12001139
tags:
12011140
- phpstan.broker.dynamicFunctionReturnTypeExtension
1141+
arguments:
1142+
checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%
12021143

12031144
-
1204-
class: PHPStan\Type\Php\ArrayFindKeyFunctionReturnTypeExtension
1205-
tags:
1206-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1145+
class: PHPStan\Type\Php\ConstantHelper
12071146

12081147
-
1209-
class: PHPStan\Type\Php\ArrayKeyDynamicReturnTypeExtension
1210-
tags:
1211-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1148+
class: PHPStan\Type\Php\DateFunctionReturnTypeHelper
12121149

12131150
-
12141151
class: PHPStan\Type\Php\ArrayKeyExistsFunctionTypeSpecifyingExtension
12151152
tags:
12161153
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
12171154

12181155
-
1219-
class: PHPStan\Type\Php\ArrayKeyFirstDynamicReturnTypeExtension
1220-
tags:
1221-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1222-
1223-
-
1224-
class: PHPStan\Type\Php\ArrayKeyLastDynamicReturnTypeExtension
1225-
tags:
1226-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1227-
1228-
-
1229-
class: PHPStan\Type\Php\ArrayKeysFunctionDynamicReturnTypeExtension
1230-
tags:
1231-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1232-
1233-
-
1234-
class: PHPStan\Type\Php\ArrayMapFunctionReturnTypeExtension
1235-
tags:
1236-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1237-
1238-
-
1239-
class: PHPStan\Type\Php\ArrayMergeFunctionDynamicReturnTypeExtension
1240-
tags:
1241-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1242-
1243-
-
1244-
class: PHPStan\Type\Php\ArrayNextDynamicReturnTypeExtension
1245-
tags:
1246-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1247-
1248-
-
1249-
class: PHPStan\Type\Php\ArrayPopFunctionReturnTypeExtension
1250-
tags:
1251-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1252-
1253-
-
1254-
class: PHPStan\Type\Php\ArrayRandFunctionReturnTypeExtension
1255-
tags:
1256-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1257-
1258-
-
1259-
class: PHPStan\Type\Php\ArrayReduceFunctionReturnTypeExtension
1260-
tags:
1261-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1262-
1263-
-
1264-
class: PHPStan\Type\Php\ArrayReplaceFunctionReturnTypeExtension
1265-
tags:
1266-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1267-
1268-
-
1269-
class: PHPStan\Type\Php\ArrayReverseFunctionReturnTypeExtension
1270-
tags:
1271-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1272-
1273-
-
1274-
class: PHPStan\Type\Php\ArrayShiftFunctionReturnTypeExtension
1275-
tags:
1276-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1277-
1278-
-
1279-
class: PHPStan\Type\Php\ArraySliceFunctionReturnTypeExtension
1280-
tags:
1281-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1282-
1283-
-
1284-
class: PHPStan\Type\Php\ArraySpliceFunctionReturnTypeExtension
1285-
tags:
1286-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1287-
1288-
-
1289-
class: PHPStan\Type\Php\ArraySearchFunctionDynamicReturnTypeExtension
1156+
class: PHPStan\Type\Php\AssertThrowTypeExtension
12901157
tags:
1291-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1158+
- phpstan.dynamicFunctionThrowTypeExtension
12921159

12931160
-
12941161
class: PHPStan\Type\Php\ArraySearchFunctionTypeSpecifyingExtension
12951162
tags:
12961163
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
12971164

12981165
-
1299-
class: PHPStan\Type\Php\ArrayValuesFunctionDynamicReturnTypeExtension
1300-
tags:
1301-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1302-
1303-
-
1304-
class: PHPStan\Type\Php\ArraySumFunctionDynamicReturnTypeExtension
1305-
tags:
1306-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1307-
1308-
-
1309-
class: PHPStan\Type\Php\AssertThrowTypeExtension
1310-
tags:
1311-
- phpstan.dynamicFunctionThrowTypeExtension
1312-
1313-
-
1314-
class: PHPStan\Type\Php\BackedEnumFromMethodDynamicReturnTypeExtension
1166+
class: PHPStan\Type\Php\ClosureBindDynamicReturnTypeExtension
13151167
tags:
13161168
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
13171169

13181170
-
1319-
class: PHPStan\Type\Php\Base64DecodeDynamicFunctionReturnTypeExtension
1320-
tags:
1321-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1322-
1323-
-
1324-
class: PHPStan\Type\Php\BcMathStringOrNullReturnTypeExtension
1325-
tags:
1326-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1327-
1328-
-
1329-
class: PHPStan\Type\Php\ClosureBindDynamicReturnTypeExtension
1171+
class: PHPStan\Type\Php\CountFunctionTypeSpecifyingExtension
13301172
tags:
1331-
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
1173+
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
13321174

13331175
-
13341176
class: PHPStan\Type\Php\ClosureBindToDynamicReturnTypeExtension
@@ -1341,47 +1183,9 @@ services:
13411183
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
13421184

13431185
-
1344-
class: PHPStan\Type\Php\CompactFunctionReturnTypeExtension
1345-
tags:
1346-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1347-
arguments:
1348-
checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%
1349-
1350-
-
1351-
class: PHPStan\Type\Php\ConstantFunctionReturnTypeExtension
1352-
tags:
1353-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1354-
1355-
-
1356-
class: PHPStan\Type\Php\ConstantHelper
1357-
1358-
-
1359-
class: PHPStan\Type\Php\CountFunctionReturnTypeExtension
1360-
tags:
1361-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1362-
1363-
-
1364-
class: PHPStan\Type\Php\CountCharsFunctionDynamicReturnTypeExtension
1365-
tags:
1366-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1367-
1368-
-
1369-
class: PHPStan\Type\Php\CountFunctionTypeSpecifyingExtension
1370-
tags:
1371-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1372-
1373-
-
1374-
class: PHPStan\Type\Php\CurlGetinfoFunctionDynamicReturnTypeExtension
1375-
tags:
1376-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1377-
1378-
-
1379-
class: PHPStan\Type\Php\DateFunctionReturnTypeHelper
1380-
1381-
-
1382-
class: PHPStan\Type\Php\DateFormatFunctionReturnTypeExtension
1186+
class: PHPStan\Type\Php\BackedEnumFromMethodDynamicReturnTypeExtension
13831187
tags:
1384-
- phpstan.broker.dynamicFunctionReturnTypeExtension
1188+
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
13851189

13861190
-
13871191
class: PHPStan\Type\Php\DateFormatMethodReturnTypeExtension

src/Type/Php/ArgumentBasedFunctionReturnTypeExtension.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\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\FunctionReflection;
89
use PHPStan\Type\Accessory\NonEmptyArrayType;
910
use PHPStan\Type\ArrayType;
@@ -13,6 +14,7 @@
1314
use PHPStan\Type\TypeCombinator;
1415
use function array_key_exists;
1516

17+
#[AutowiredService]
1618
final class ArgumentBasedFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
1719
{
1820

src/Type/Php/ArrayChangeKeyCaseFunctionReturnTypeExtension.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\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\FunctionReflection;
89
use PHPStan\Type\Accessory\AccessoryArrayListType;
910
use PHPStan\Type\Accessory\AccessoryLowercaseStringType;
@@ -29,6 +30,7 @@
2930
use const CASE_LOWER;
3031
use const CASE_UPPER;
3132

33+
#[AutowiredService]
3234
final class ArrayChangeKeyCaseFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
3335
{
3436

src/Type/Php/ArrayChunkFunctionReturnTypeExtension.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\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Php\PhpVersion;
89
use PHPStan\Reflection\FunctionReflection;
910
use PHPStan\Type\Constant\ConstantBooleanType;
@@ -14,6 +15,7 @@
1415
use PHPStan\Type\Type;
1516
use function count;
1617

18+
#[AutowiredService]
1719
final class ArrayChunkFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
1820
{
1921

src/Type/Php/ArrayColumnFunctionReturnTypeExtension.php

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

55
use PhpParser\Node\Expr\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\FunctionReflection;
89
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
910
use PHPStan\Type\NullType;
1011
use PHPStan\Type\Type;
1112
use function count;
1213

14+
#[AutowiredService]
1315
final class ArrayColumnFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
1416
{
1517

src/Type/Php/ArrayColumnHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPStan\Type\Php;
44

55
use PHPStan\Analyser\Scope;
6+
use PHPStan\DependencyInjection\AutowiredService;
67
use PHPStan\Php\PhpVersion;
78
use PHPStan\ShouldNotHappenException;
89
use PHPStan\TrinaryLogic;
@@ -17,6 +18,7 @@
1718
use PHPStan\Type\Type;
1819
use PHPStan\Type\TypeCombinator;
1920

21+
#[AutowiredService]
2022
final class ArrayColumnHelper
2123
{
2224

src/Type/Php/ArrayCombineFunctionReturnTypeExtension.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\Variable;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Php\PhpVersion;
910
use PHPStan\Reflection\FunctionReflection;
1011
use PHPStan\Type\Accessory\NonEmptyArrayType;
@@ -23,6 +24,7 @@
2324
use PHPStan\Type\UnionType;
2425
use function count;
2526

27+
#[AutowiredService]
2628
final class ArrayCombineFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
2729
{
2830

src/Type/Php/ArrayCurrentDynamicReturnTypeExtension.php

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

55
use PhpParser\Node\Expr\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\FunctionReflection;
89
use PHPStan\Type\Constant\ConstantBooleanType;
910
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
1011
use PHPStan\Type\Type;
1112
use PHPStan\Type\TypeCombinator;
1213

14+
#[AutowiredService]
1315
final class ArrayCurrentDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
1416
{
1517

src/Type/Php/ArrayFillFunctionReturnTypeExtension.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\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Php\PhpVersion;
89
use PHPStan\Reflection\FunctionReflection;
910
use PHPStan\Type\Accessory\AccessoryArrayListType;
@@ -20,6 +21,7 @@
2021
use PHPStan\Type\TypeCombinator;
2122
use function count;
2223

24+
#[AutowiredService]
2325
final class ArrayFillFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
2426
{
2527

0 commit comments

Comments
 (0)