Skip to content

Commit 2bccde7

Browse files
committed
fix
1 parent 168b08b commit 2bccde7

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
@@ -33,9 +33,9 @@ public function producesWarningForFinalPrivateMethods(): TrinaryLogic
3333
return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
3434
}
3535

36-
public function socketCreateUsesResource(): TrinaryLogic
36+
public function socketCreateUsesClass(): TrinaryLogic
3737
{
38-
return IntegerRangeType::fromInterval(null, 79999)->isSuperTypeOf($this->phpVersions)->result;
38+
return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
3939
}
4040

4141
public function supportsNamedArguments(): TrinaryLogic

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)