phpstan fixes

This commit is contained in:
Robin Appelman 2025-10-25 21:43:15 +02:00
commit 5d37f6813d
10 changed files with 24 additions and 86 deletions

View file

@ -146,7 +146,7 @@ final class Parser {
// A line = explode statement may not fill all array elements
// properly. May happen when accessing non Windows Fileservers
$words = explode(':', $line, 2);
$name = isset($words[0]) ? $words[0] : '';
$name = $words[0];
$value = isset($words[1]) ? $words[1] : '';
$value = trim($value);
@ -160,7 +160,7 @@ final class Parser {
}
return [
'mtime' => (int)strtotime($data['write_time']),
'mode' => hexdec(substr($data['attributes'], $attributeStart + 1, -1)),
'mode' => (int)hexdec(substr($data['attributes'], $attributeStart + 1, -1)),
'size' => isset($data['stream']) ? (int)(explode(' ', $data['stream'])[1]) : 0
];
}
@ -255,7 +255,7 @@ final class Parser {
}
if (substr($mask, 0, 2) === '0x') {
$maskInt = hexdec($mask);
$maskInt = (int)hexdec($mask);
} else {
$maskInt = 0;
foreach (explode('|', $mask) as $maskString) {