Skip to content

Commit

Permalink
fix: phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 31, 2023
1 parent 4f366e9 commit f5829ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/BannedIPData.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public function export(): ?array
BannedIP::query()
->where('user_id', $this->user->id)
->each(function (BannedIP $bannedIp) use (&$exportData) {
$exportData[] = ["bannedIP/{$bannedIp->id}.json" => $this->sanitize($bannedIp)];
$exportData[] = ["bannedIP/ip-{$bannedIp->id}.json" => $this->encodeForExport($this->sanitize($bannedIp))];
});

return $exportData;
}

public function sanitize(BannedIP $bannedIP): array
{
return Arr::except($bannedIP, ['id', 'creator_id', 'user_id']);
return Arr::except($bannedIP->toArray(), ['id', 'creator_id', 'user_id']);
}

public function anonymize(): void
Expand Down

0 comments on commit f5829ae

Please sign in to comment.