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 type hints
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and blizzz committed Oct 11, 2023
commit 29c36f85b0a008e1dc677c612b472488bcdd5f5e
8 changes: 3 additions & 5 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,7 @@ public function getIncompleteChildrenCount($fileId) {
* calculate the size of a folder and set it in the cache
*
* @param string $path
* @param array $entry (optional) meta data of the folder
* @param bool $ignoreUnknown don't mark the folder size as unknown if any of it's children are unknown
* @param array|null|ICacheEntry $entry (optional) meta data of the folder
* @return int|float
*/
public function calculateFolderSize($path, $entry = null) {
Expand All @@ -895,11 +894,11 @@ public function calculateFolderSize($path, $entry = null) {
* inner function because we can't add new params to the public function without breaking any child classes
*
* @param string $path
* @param array $entry (optional) meta data of the folder
* @param array|null|ICacheEntry $entry (optional) meta data of the folder
* @param bool $ignoreUnknown don't mark the folder size as unknown if any of it's children are unknown
* @return int
*/
protected function calculateFolderSizeInner(string $path, array $entry = null, bool $ignoreUnknown = false) {
protected function calculateFolderSizeInner(string $path, $entry = null, bool $ignoreUnknown = false) {
$totalSize = 0;
if (is_null($entry) || !isset($entry['fileid'])) {
$entry = $this->get($path);
Expand Down Expand Up @@ -959,7 +958,6 @@ protected function calculateFolderSizeInner(string $path, array $entry = null, b
$shouldWriteUnEncryptedSize = $unencryptedMax > 0 || $totalSize === 0 || $entry['unencrypted_size'] > 0;
if ($entry['size'] !== $totalSize || ($entry['unencrypted_size'] !== $unencryptedTotal && $shouldWriteUnEncryptedSize)) {
if ($shouldWriteUnEncryptedSize) {

// if all children have an unencrypted size of 0, just set the folder unencrypted size to 0 instead of summing the sizes
if ($unencryptedMax === 0) {
$unencryptedTotal = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/HomeCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HomeCache extends Cache {
* get the size of a folder and set it in the cache
*
* @param string $path
* @param array $entry (optional) meta data of the folder
* @param array|null|ICacheEntry $entry (optional) meta data of the folder
* @return int|float
*/
public function calculateFolderSize($path, $entry = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Wrapper/CacheJail.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function correctFolderSize($path, $data = null, $isBackgroundScan = false
* get the size of a folder and set it in the cache
*
* @param string $path
* @param array $entry (optional) meta data of the folder
* @param array|null|ICacheEntry $entry (optional) meta data of the folder
* @return int|float
*/
public function calculateFolderSize($path, $entry = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Wrapper/CacheWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function correctFolderSize($path, $data = null, $isBackgroundScan = false
* get the size of a folder and set it in the cache
*
* @param string $path
* @param array $entry (optional) meta data of the folder
* @param array|null|ICacheEntry $entry (optional) meta data of the folder
* @return int|float
*/
public function calculateFolderSize($path, $entry = null) {
Expand Down