diff --git a/src/Php/PhpVersions.php b/src/Php/PhpVersions.php index d2b6e66090..6ba173f663 100644 --- a/src/Php/PhpVersions.php +++ b/src/Php/PhpVersions.php @@ -33,7 +33,7 @@ public function producesWarningForFinalPrivateMethods(): TrinaryLogic return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result; } - public function socketCreateUsesClass(): TrinaryLogic + public function socketCreateReturnsObject(): TrinaryLogic { return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result; } diff --git a/src/Type/Php/SocketCreateReturnTypeExtension.php b/src/Type/Php/SocketCreateReturnTypeExtension.php index c3612d6263..b203c54bbb 100644 --- a/src/Type/Php/SocketCreateReturnTypeExtension.php +++ b/src/Type/Php/SocketCreateReturnTypeExtension.php @@ -27,11 +27,11 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection, return null; } - if ($scope->getPhpVersion()->socketCreateUsesClass()->yes()) { + if ($scope->getPhpVersion()->socketCreateReturnsObject()->yes()) { return new UnionType([new ConstantBooleanType(false), new ObjectType('\\Socket')]); } - if ($scope->getPhpVersion()->socketCreateUsesClass()->no()) { + if ($scope->getPhpVersion()->socketCreateReturnsObject()->no()) { return new UnionType([new ConstantBooleanType(false), new ResourceType()]); }