Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix quota typing for 32bits after forward port from 25
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot-nextcloud[bot] committed Apr 1, 2023
commit a0beacde69245d409604a7d0722286d8290d6563
4 changes: 2 additions & 2 deletions lib/private/Files/Storage/Wrapper/Quota.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Quota extends Wrapper {
/** @var callable|null */
protected $quotaCallback;
/** @var int|float|null int on 64bits, float on 32bits for bigint */
protected $quota;
protected int|float|null $quota;
protected string $sizeRoot;
private SystemConfig $config;

Expand All @@ -60,7 +60,7 @@ public function __construct($parameters) {
/**
* @return int|float quota value
*/
public function getQuota() {
public function getQuota(): int|float {
if ($this->quota === null) {
$quotaCallback = $this->quotaCallback;
if ($quotaCallback === null) {
Expand Down
5 changes: 2 additions & 3 deletions lib/private/LargeFileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ public function formatUnsignedInteger(int|float|string $number): string {
*
* @param string $filename Path to the file.
*
* @return int|float Number of bytes as number (float or int) or
* null on failure.
* @return int|float Number of bytes as number (float or int)
*/
public function getFileSize(string $filename): null|int|float {
public function getFileSize(string $filename): int|float {
$fileSize = $this->getFileSizeViaCurl($filename);
if (!is_null($fileSize)) {
return $fileSize;
Expand Down