diff --git a/rules/Naming/Naming/ExpectedNameResolver.php b/rules/Naming/Naming/ExpectedNameResolver.php index 571407e60f5..fc84ad6bcf8 100644 --- a/rules/Naming/Naming/ExpectedNameResolver.php +++ b/rules/Naming/Naming/ExpectedNameResolver.php @@ -116,7 +116,7 @@ public function resolveForCall($expr) : ?string return null; } $returnedType = $this->nodeTypeResolver->getType($expr); - if (!$returnedType->isObject()->yes()) { + if (!$returnedType instanceof ObjectType) { return null; } if ($this->isDateTimeType($returnedType)) { @@ -197,14 +197,11 @@ private function resolveReturnTypeFromArrayType(ArrayType $arrayType) : ?Type /** * Skip date time, as custom naming */ - private function isDateTimeType(Type $type) : bool + private function isDateTimeType(ObjectType $objectType) : bool { - if (!$type instanceof ObjectType) { - return \false; - } - if ($type->isInstanceOf('DateTimeInterface')->yes()) { + if ($objectType->isInstanceOf('DateTimeInterface')->yes()) { return \true; } - return $type->isInstanceOf('DateTime')->yes(); + return $objectType->isInstanceOf('DateTime')->yes(); } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 4f7d65138a9..ffbc9fef4bf 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '84bb59697d2cf5d564b5a2ace9be4f3496d6f131'; + public const PACKAGE_VERSION = '26b8b540ed08315062c007dafd572f9896b509eb'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-11-12 20:13:01'; + public const RELEASE_DATE = '2024-11-12 21:17:49'; /** * @var int */