Skip to content

Commit da618c4

Browse files
come-ncMichaIng
authored andcommitted
Fix quota typing for 32bits after forward port from 25
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
1 parent 3f84d41 commit da618c4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/private/Files/Storage/Wrapper/Quota.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Quota extends Wrapper {
4242
/** @var callable|null */
4343
protected $quotaCallback;
4444
/** @var int|float|null int on 64bits, float on 32bits for bigint */
45-
protected $quota;
45+
protected int|float|null $quota;
4646
protected string $sizeRoot;
4747
private SystemConfig $config;
4848

@@ -60,7 +60,7 @@ public function __construct($parameters) {
6060
/**
6161
* @return int|float quota value
6262
*/
63-
public function getQuota() {
63+
public function getQuota(): int|float {
6464
if ($this->quota === null) {
6565
$quotaCallback = $this->quotaCallback;
6666
if ($quotaCallback === null) {

lib/private/LargeFileHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ public function formatUnsignedInteger(int|float|string $number): string {
9595
*
9696
* @param string $filename Path to the file.
9797
*
98-
* @return int|float Number of bytes as number (float or int) or
99-
* null on failure.
98+
* @return int|float Number of bytes as number (float or int)
10099
*/
101-
public function getFileSize(string $filename): null|int|float {
100+
public function getFileSize(string $filename): int|float {
102101
$fileSize = $this->getFileSizeViaCurl($filename);
103102
if (!is_null($fileSize)) {
104103
return $fileSize;

0 commit comments

Comments
 (0)