Skip to content

Commit dfbffe5

Browse files
committed
more autowire
1 parent d8279ff commit dfbffe5

9 files changed

+16
-40
lines changed

conf/config.neon

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,53 +1322,13 @@ services:
13221322
tags:
13231323
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
13241324

1325-
-
1326-
class: PHPStan\Type\Php\ThrowableReturnTypeExtension
1327-
tags:
1328-
- phpstan.broker.dynamicMethodReturnTypeExtension
1329-
13301325
-
13311326
class: PHPStan\Type\Php\VersionCompareFunctionDynamicReturnTypeExtension
13321327
arguments:
13331328
configPhpVersion: %phpVersion%
13341329
tags:
13351330
- phpstan.broker.dynamicFunctionReturnTypeExtension
13361331

1337-
-
1338-
class: PHPStan\Type\Php\AssertFunctionTypeSpecifyingExtension
1339-
tags:
1340-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1341-
1342-
-
1343-
class: PHPStan\Type\Php\ClassExistsFunctionTypeSpecifyingExtension
1344-
tags:
1345-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1346-
1347-
-
1348-
class: PHPStan\Type\Php\DefineConstantTypeSpecifyingExtension
1349-
tags:
1350-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1351-
1352-
-
1353-
class: PHPStan\Type\Php\DefinedConstantTypeSpecifyingExtension
1354-
tags:
1355-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1356-
1357-
-
1358-
class: PHPStan\Type\Php\FunctionExistsFunctionTypeSpecifyingExtension
1359-
tags:
1360-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1361-
1362-
-
1363-
class: PHPStan\Type\Php\InArrayFunctionTypeSpecifyingExtension
1364-
tags:
1365-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1366-
1367-
-
1368-
class: PHPStan\Type\Php\IsArrayFunctionTypeSpecifyingExtension
1369-
tags:
1370-
- phpstan.typeSpecifier.functionTypeSpecifyingExtension
1371-
13721332
-
13731333
class: PHPStan\Type\Php\TypeSpecifyingFunctionsDynamicReturnTypeExtension
13741334
arguments:

src/Type/Php/AssertFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
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\FunctionTypeSpecifyingExtension;
1314

15+
#[AutowiredService]
1416
final class AssertFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1517
{
1618

src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.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\Type\ClassStringType;
1617
use PHPStan\Type\Constant\ConstantBooleanType;
@@ -21,6 +22,7 @@
2122
use function in_array;
2223
use function ltrim;
2324

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

src/Type/Php/DefineConstantTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
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\Constant\ConstantStringType;
1415
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1516
use function count;
1617

18+
#[AutowiredService]
1719
final class DefineConstantTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1820
{
1921

src/Type/Php/DefinedConstantTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
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\Constant\ConstantStringType;
1314
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1415
use PHPStan\Type\MixedType;
1516
use function count;
1617

18+
#[AutowiredService]
1719
final class DefinedConstantTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1820
{
1921

src/Type/Php/FunctionExistsFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
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\Type\CallableType;
1617
use PHPStan\Type\Constant\ConstantBooleanType;
1718
use PHPStan\Type\Constant\ConstantStringType;
1819
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1920
use function ltrim;
2021

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

src/Type/Php/InArrayFunctionTypeSpecifyingExtension.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\Node\Expr\AlwaysRememberedExpr;
1516
use PHPStan\Reflection\FunctionReflection;
1617
use PHPStan\Type\Accessory\NonEmptyArrayType;
@@ -21,6 +22,7 @@
2122
use function count;
2223
use function strtolower;
2324

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

src/Type/Php/IsArrayFunctionTypeSpecifyingExtension.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\FunctionReflection;
1213
use PHPStan\ShouldNotHappenException;
1314
use PHPStan\Type\ArrayType;
1415
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1516
use PHPStan\Type\MixedType;
1617
use function strtolower;
1718

19+
#[AutowiredService]
1820
final class IsArrayFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1921
{
2022

src/Type/Php/ThrowableReturnTypeExtension.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\MethodCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\MethodReflection;
89
use PHPStan\Type\BenevolentUnionType;
910
use PHPStan\Type\DynamicMethodReturnTypeExtension;
@@ -18,6 +19,7 @@
1819
use function in_array;
1920
use function strtolower;
2021

22+
#[AutowiredService]
2123
final class ThrowableReturnTypeExtension implements DynamicMethodReturnTypeExtension
2224
{
2325

0 commit comments

Comments
 (0)