diff --git a/src/Type/Enum/EnumCaseObjectType.php b/src/Type/Enum/EnumCaseObjectType.php index 4589f8e4c2..c367d70717 100644 --- a/src/Type/Enum/EnumCaseObjectType.php +++ b/src/Type/Enum/EnumCaseObjectType.php @@ -53,8 +53,8 @@ public function equals(Type $type): bool return false; } - return $this->getClassName() === $type->getClassName() - && $this->enumCaseName === $type->enumCaseName; + return $this->enumCaseName === $type->enumCaseName && + $this->getClassName() === $type->getClassName(); } public function accepts(Type $type, bool $strictTypes): TrinaryLogic @@ -71,8 +71,7 @@ public function isSuperTypeOf(Type $type): TrinaryLogic { if ($type instanceof self) { return TrinaryLogic::createFromBoolean( - $this->getClassName() === $type->getClassName() - && $this->enumCaseName === $type->enumCaseName, + $this->enumCaseName === $type->enumCaseName && $this->getClassName() === $type->getClassName(), ); }