Skip to content

Commit de37a74

Browse files
committed
Improve EntityId::equals
1 parent 454243e commit de37a74

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Entity/EntityId.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ public function __toString() {
110110
* @return boolean
111111
*/
112112
public function equals( $target ) {
113-
return $target instanceof EntityId
114-
&& $target->getSerialization() === $this->serialization
115-
&& $target->getEntityType() === $this->entityType;
113+
return $target instanceof self
114+
&& $target->serialization === $this->serialization;
116115
}
117116

118117
/**

0 commit comments

Comments
 (0)