Skip to content

Commit f035e7a

Browse files
committed
fix
1 parent 16ba677 commit f035e7a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Php/PhpVersions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function producesWarningForFinalPrivateMethods(): TrinaryLogic
2828
return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
2929
}
3030

31-
public function socketCreateUsesResource(): TrinaryLogic
31+
public function socketCreateUsesClass(): TrinaryLogic
3232
{
33-
return IntegerRangeType::fromInterval(null, 79999)->isSuperTypeOf($this->phpVersions)->result;
33+
return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
3434
}
3535

3636
}

src/Type/Php/SocketCreateReturnTypeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
2727
return null;
2828
}
2929

30-
if ($scope->getPhpVersion()->socketCreateUsesResource()->no()) {
30+
if ($scope->getPhpVersion()->socketCreateUsesClass()->yes()) {
3131
return new UnionType([new ConstantBooleanType(false), new ObjectType('\\Socket')]);
3232
}
3333

34-
if ($scope->getPhpVersion()->socketCreateUsesResource()->yes()) {
34+
if ($scope->getPhpVersion()->socketCreateUsesClass()->no()) {
3535
return new UnionType([new ConstantBooleanType(false), new ResourceType()]);
3636
}
3737

0 commit comments

Comments
 (0)