Skip to content

Commit f097ce4

Browse files
authored
[Bug] Download and upload bits should be a nullable int (alexjustesen#1170)
1 parent cadb66e commit f097ce4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Models/Result.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function prunable(): Builder
9595
protected function downloadBits(): Attribute
9696
{
9797
return Attribute::make(
98-
get: fn (): ?string => ! blank($this->download) && is_numeric($this->download)
98+
get: fn (): ?int => ! blank($this->download) && is_numeric($this->download)
9999
? number_format(num: $this->download * 8, decimals: 0, thousands_separator: '')
100100
: null,
101101
);
@@ -207,7 +207,7 @@ protected function serverName(): Attribute
207207
protected function uploadBits(): Attribute
208208
{
209209
return Attribute::make(
210-
get: fn (): ?string => ! blank($this->upload) && is_numeric($this->upload)
210+
get: fn (): ?int => ! blank($this->upload) && is_numeric($this->upload)
211211
? number_format(num: $this->upload * 8, decimals: 0, thousands_separator: '')
212212
: null,
213213
);

0 commit comments

Comments
 (0)