Skip to content

Commit 3dc0f07

Browse files
committed
Merge pull request #156 from wmde/entityidd
Improve EntityId::equals
2 parents 6e322ea + de37a74 commit 3dc0f07

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)