-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable25] Get rid of more int casts in file size manipulations #38290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
| $data['parent'] = (int)$data['parent']; | ||
| $data['size'] = 0 + $data['size']; | ||
| $data['unencrypted_size'] = 0 + ($data['unencrypted_size'] ?? 0); | ||
| $data['size'] = Util::numericToNumber($data['size']); |
Check failure
Code scanning / Psalm
UndefinedMethod
| $data['size'] = 0 + $data['size']; | ||
| $data['unencrypted_size'] = 0 + ($data['unencrypted_size'] ?? 0); | ||
| $data['size'] = Util::numericToNumber($data['size']); | ||
| $data['unencrypted_size'] = Util::numericToNumber($data['unencrypted_size'] ?? 0); |
Check failure
Code scanning / Psalm
UndefinedMethod
| }, $rows); | ||
| $unencryptedSizes = array_map(function (array $row) { | ||
| return (int)(($row['unencrypted_size'] > 0) ? $row['unencrypted_size'] : $row['size']); | ||
| return Util::numericToNumber(($row['unencrypted_size'] > 0) ? $row['unencrypted_size'] : $row['size']); |
Check failure
Code scanning / Psalm
UndefinedMethod
lib/private/Files/Cache/Cache.php
Outdated
Check failure
Code scanning / Psalm
UndefinedMethod
lib/private/Files/Cache/Cache.php
Outdated
Check failure
Code scanning / Psalm
UndefinedMethod
| } | ||
| if (isset($response['{DAV:}quota-available-bytes'])) { | ||
| return (int)$response['{DAV:}quota-available-bytes']; | ||
| return Util::numericToNumber($response['{DAV:}quota-available-bytes']); |
Check failure
Code scanning / Psalm
UndefinedMethod
| return [ | ||
| 'mtime' => isset($response['{DAV:}getlastmodified']) ? strtotime($response['{DAV:}getlastmodified']) : null, | ||
| 'size' => (int)($response['{DAV:}getcontentlength'] ?? 0), | ||
| 'size' => Util::numericToNumber($response['{DAV:}getcontentlength'] ?? 0), |
Check failure
Code scanning / Psalm
UndefinedMethod
|
This would need #37877 first I think |
|
backport incomplete, moving to 25.0.8 |
backport of #38196