Skip to content

Commit b418b81

Browse files
committed
more autowire
1 parent 5f316aa commit b418b81

8 files changed

+14
-35
lines changed

conf/config.neon

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,41 +1197,6 @@ services:
11971197
arguments:
11981198
dateTimeClass: DateTimeImmutable
11991199

1200-
-
1201-
class: PHPStan\Type\Php\DateTimeConstructorThrowTypeExtension
1202-
tags:
1203-
- phpstan.dynamicStaticMethodThrowTypeExtension
1204-
1205-
-
1206-
class: PHPStan\Type\Php\DateTimeModifyMethodThrowTypeExtension
1207-
tags:
1208-
- phpstan.dynamicMethodThrowTypeExtension
1209-
1210-
-
1211-
class: PHPStan\Type\Php\DateTimeSubMethodThrowTypeExtension
1212-
tags:
1213-
- phpstan.dynamicMethodThrowTypeExtension
1214-
1215-
-
1216-
class: PHPStan\Type\Php\DateTimeZoneConstructorThrowTypeExtension
1217-
tags:
1218-
- phpstan.dynamicStaticMethodThrowTypeExtension
1219-
1220-
-
1221-
class: PHPStan\Type\Php\DsMapDynamicReturnTypeExtension
1222-
tags:
1223-
- phpstan.broker.dynamicMethodReturnTypeExtension
1224-
1225-
-
1226-
class: PHPStan\Type\Php\DsMapDynamicMethodThrowTypeExtension
1227-
tags:
1228-
- phpstan.dynamicMethodThrowTypeExtension
1229-
1230-
-
1231-
class: PHPStan\Type\Php\IntdivThrowTypeExtension
1232-
tags:
1233-
- phpstan.dynamicFunctionThrowTypeExtension
1234-
12351200
-
12361201
class: PHPStan\Type\Php\VersionCompareFunctionDynamicReturnTypeExtension
12371202
arguments:

src/Type/Php/DateTimeConstructorThrowTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DateTimeImmutable;
77
use PhpParser\Node\Expr\StaticCall;
88
use PHPStan\Analyser\Scope;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Php\PhpVersion;
1011
use PHPStan\Reflection\MethodReflection;
1112
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
@@ -16,6 +17,7 @@
1617
use function count;
1718
use function in_array;
1819

20+
#[AutowiredService]
1921
final class DateTimeConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
2022
{
2123

src/Type/Php/DateTimeModifyMethodThrowTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DateTimeImmutable;
77
use PhpParser\Node\Expr\MethodCall;
88
use PHPStan\Analyser\Scope;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Php\PhpVersion;
1011
use PHPStan\Reflection\MethodReflection;
1112
use PHPStan\Type\DynamicMethodThrowTypeExtension;
@@ -16,6 +17,7 @@
1617
use function count;
1718
use function in_array;
1819

20+
#[AutowiredService]
1921
final class DateTimeModifyMethodThrowTypeExtension implements DynamicMethodThrowTypeExtension
2022
{
2123

src/Type/Php/DateTimeSubMethodThrowTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DateTimeImmutable;
77
use PhpParser\Node\Expr\MethodCall;
88
use PHPStan\Analyser\Scope;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Php\PhpVersion;
1011
use PHPStan\Reflection\MethodReflection;
1112
use PHPStan\Type\DynamicMethodThrowTypeExtension;
@@ -14,6 +15,7 @@
1415
use function count;
1516
use function in_array;
1617

18+
#[AutowiredService]
1719
final class DateTimeSubMethodThrowTypeExtension implements DynamicMethodThrowTypeExtension
1820
{
1921

src/Type/Php/DateTimeZoneConstructorThrowTypeExtension.php

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

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

src/Type/Php/DsMapDynamicMethodThrowTypeExtension.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\MethodCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\MethodReflection;
89
use PHPStan\Type\DynamicMethodThrowTypeExtension;
910
use PHPStan\Type\Type;
1011
use PHPStan\Type\VoidType;
1112
use function count;
1213

14+
#[AutowiredService]
1315
final class DsMapDynamicMethodThrowTypeExtension implements DynamicMethodThrowTypeExtension
1416
{
1517

src/Type/Php/DsMapDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
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\DynamicMethodReturnTypeExtension;
910
use PHPStan\Type\Type;
1011
use PHPStan\Type\TypeWithClassName;
1112
use function count;
1213
use function in_array;
1314

15+
#[AutowiredService]
1416
final class DsMapDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
1517
{
1618

src/Type/Php/IntdivThrowTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DivisionByZeroError;
77
use PhpParser\Node\Expr\FuncCall;
88
use PHPStan\Analyser\Scope;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Reflection\FunctionReflection;
1011
use PHPStan\Type\Constant\ConstantIntegerType;
1112
use PHPStan\Type\DynamicFunctionThrowTypeExtension;
@@ -14,6 +15,7 @@
1415
use function count;
1516
use const PHP_INT_MIN;
1617

18+
#[AutowiredService]
1719
final class IntdivThrowTypeExtension implements DynamicFunctionThrowTypeExtension
1820
{
1921

0 commit comments

Comments
 (0)