Skip to content

Commit 6fbe3c4

Browse files
staabmondrejmirtes
authored andcommitted
More DynamicFunctionReturnTypeExtension converted to #[AutowiredService] attribute usage
1 parent 339a29d commit 6fbe3c4

File tree

98 files changed

+208
-492
lines changed

Some content is hidden

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

98 files changed

+208
-492
lines changed

conf/config.neon

Lines changed: 14 additions & 492 deletions
Large diffs are not rendered by default.

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

src/Type/Php/ArrayFillKeysFunctionReturnTypeExtension.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\DynamicFunctionReturnTypeExtension;
@@ -12,6 +13,7 @@
1213
use PHPStan\Type\Type;
1314
use function count;
1415

16+
#[AutowiredService]
1517
final class ArrayFillKeysFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
1618
{
1719

0 commit comments

Comments
 (0)