Skip to content

Commit

Permalink
Fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Aug 8, 2024
1 parent e556707 commit 97e73e1
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ public function __construct(
$minValue = 0,
$maxValue = null
) {
$minValue = $this->convertToBytes($minValue);

if ($maxValue > 0) {
$maxValue = $this->convertToBytes($maxValue);
}

parent::__construct(
$fieldDefIdentifier,
$this->convertToBytes($minValue),
$minValue,
$maxValue
);
}
Expand All @@ -33,10 +35,6 @@ private function convertToBytes($value): int
{
$value *= 1024 * 1024;

if (is_float($value)) {
$value = (int)$value;
}

return $value;
return (int)$value;
}
}

0 comments on commit 97e73e1

Please sign in to comment.