Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 237165e

Browse files
Fixes after PHPStan update
1 parent d1e08ac commit 237165e

5 files changed

+12
-12
lines changed

‎src/Rules/Symfony/ContainerInterfacePrivateServiceRule.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ public function processNode(Node $node, Scope $scope): array
8282
private function isServiceSubscriber(Type $containerType, Scope $scope): TrinaryLogic
8383
{
8484
$serviceSubscriberInterfaceType = new ObjectType('Symfony\Contracts\Service\ServiceSubscriberInterface');
85-
$isContainerServiceSubscriber = $serviceSubscriberInterfaceType->isSuperTypeOf($containerType);
85+
$isContainerServiceSubscriber = $serviceSubscriberInterfaceType->isSuperTypeOf($containerType)->result;
8686
$classReflection = $scope->getClassReflection();
8787
if ($classReflection === null) {
8888
return $isContainerServiceSubscriber;
8989
}
9090
$containedClassType = new ObjectType($classReflection->getName());
91-
return $isContainerServiceSubscriber->or($serviceSubscriberInterfaceType->isSuperTypeOf($containedClassType));
91+
return $isContainerServiceSubscriber->or($serviceSubscriberInterfaceType->isSuperTypeOf($containedClassType)->result);
9292
}
9393

9494
}

‎src/Type/Symfony/Form/FormInterfaceDynamicReturnTypeExtension.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public function getTypeFromMethodCall(
4141
$firstArgType = $scope->getType($methodCall->getArgs()[0]->value);
4242
$secondArgType = $scope->getType($methodCall->getArgs()[1]->value);
4343

44-
$firstIsTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType);
45-
$firstIsFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType);
46-
$secondIsTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($secondArgType);
47-
$secondIsFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($secondArgType);
44+
$firstIsTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType)->result;
45+
$firstIsFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType)->result;
46+
$secondIsTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($secondArgType)->result;
47+
$secondIsFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($secondArgType)->result;
4848

4949
$firstCompareType = $firstIsTrueType->compareTo($firstIsFalseType);
5050
$secondCompareType = $secondIsTrueType->compareTo($secondIsFalseType);

‎src/Type/Symfony/HeaderBagDynamicReturnTypeExtension.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function getTypeFromMethodCall(
3434
): ?Type
3535
{
3636
$firstArgType = isset($methodCall->getArgs()[2]) ? $scope->getType($methodCall->getArgs()[2]->value) : new ConstantBooleanType(true);
37-
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType);
38-
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType);
37+
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType)->result;
38+
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType)->result;
3939
$compareTypes = $isTrueType->compareTo($isFalseType);
4040

4141
if ($compareTypes === $isTrueType) {

‎src/Type/Symfony/KernelInterfaceDynamicReturnTypeExtension.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function getTypeFromMethodCall(
3232
): ?Type
3333
{
3434
$firstArgType = isset($methodCall->getArgs()[2]) ? $scope->getType($methodCall->getArgs()[2]->value) : new ConstantBooleanType(true);
35-
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType);
36-
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType);
35+
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($firstArgType)->result;
36+
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($firstArgType)->result;
3737
$compareTypes = $isTrueType->compareTo($isFalseType);
3838

3939
if ($compareTypes === $isTrueType) {

‎src/Type/Symfony/RequestDynamicReturnTypeExtension.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function getTypeFromMethodCall(
3535
}
3636

3737
$argType = $scope->getType($methodCall->getArgs()[0]->value);
38-
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($argType);
39-
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($argType);
38+
$isTrueType = (new ConstantBooleanType(true))->isSuperTypeOf($argType)->result;
39+
$isFalseType = (new ConstantBooleanType(false))->isSuperTypeOf($argType)->result;
4040
$compareTypes = $isTrueType->compareTo($isFalseType);
4141
if ($compareTypes === $isTrueType) {
4242
return new ResourceType();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /