public function matches($entity) { return [get_class($this), $this->id] === [get_class($entity), $entity->id]; }