mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-10-01 17:14:08 +02:00
psalm fixes
This commit is contained in:
parent
edc9703e6b
commit
8101154ac3
6 changed files with 26 additions and 7 deletions
|
|
@ -159,7 +159,7 @@ final class Parser {
|
|||
throw new Exception("Malformed state response from server");
|
||||
}
|
||||
return [
|
||||
'mtime' => strtotime($data['write_time']),
|
||||
'mtime' => (int)strtotime($data['write_time']),
|
||||
'mode' => hexdec(substr($data['attributes'], $attributeStart + 1, -1)),
|
||||
'size' => isset($data['stream']) ? (int)(explode(' ', $data['stream'])[1]) : 0
|
||||
];
|
||||
|
|
@ -182,7 +182,7 @@ final class Parser {
|
|||
list(, $name, $mode, $size, $time) = $matches;
|
||||
if ($name !== '.' and $name !== '..') {
|
||||
$mode = $this->parseMode(strtoupper($mode));
|
||||
$time = strtotime($time . ' ' . $this->timeZone);
|
||||
$time = (int)strtotime($time . ' ' . $this->timeZone);
|
||||
$path = $basePath . '/' . $name;
|
||||
$content[] = new FileInfo($path, $name, (int)$size, $time, $mode, function () use ($aclCallback, $path): array {
|
||||
return $aclCallback($path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue