[stable25] Get rid of more int casts in file size manipulations#38290
Closed
backportbot-nextcloud[bot] wants to merge 2 commits intostable25from
Closed
[stable25] Get rid of more int casts in file size manipulations#38290backportbot-nextcloud[bot] wants to merge 2 commits intostable25from
backportbot-nextcloud[bot] wants to merge 2 commits intostable25from
Conversation
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
artonge
approved these changes
May 15, 2023
| $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
Contributor
|
This would need #37877 first I think |
Merged
Member
|
backport incomplete, moving to 25.0.8 |
Merged
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of #38196