Skip to content

Commit

Permalink
fix: Fix small psalm errors in legacy
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Apr 29, 2024
1 parent 1cf87c4 commit 7f2a1fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static function sendHeaders($filename, $name, array $rangeArray): void {
* return the content of a file or return a zip file containing multiple files
*
* @param string $dir
* @param string $files ; separated list of files to download
* @param string|array $files ; separated list of files to download
* @param array $params ; 'head' boolean to only send header of the request ; 'range' http range header
*/
public static function get($dir, $files, $params = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static function computerFileSize(string $str): false|int|float {

$bytes = (float)$str;

if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && !empty($bytes_array[$matches[1]])) {
if (preg_match('#([kmgtp]?b?)$#si', $str, $matches)) {
$bytes *= $bytes_array[$matches[1]];
} else {
return false;
Expand Down

0 comments on commit 7f2a1fa

Please sign in to comment.