/** * {@inheritdoc} */ public function isIdentityEqualTo(Entity $entity) : bool { return $entity instanceof Country && $entity->getCode() === $this->code; }