diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/System.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/System.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/System.php b/apps/files_external/3rdparty/icewind/smb/src/System.php index 0e41ee032d6..919907477ab 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/System.php +++ b/apps/files_external/3rdparty/icewind/smb/src/System.php @@ -10,7 +10,7 @@ namespace Icewind\SMB; use Icewind\SMB\Exception\Exception; class System implements ISystem { - /** @var (string|bool)[] */ + /** @var (string|null)[] */ private $paths = []; /** @@ -20,7 +20,7 @@ class System implements ISystem { * @return string * @throws Exception */ - public function getFD($num) { + public function getFD(int $num): string { $folders = [ '/proc/self/fd', '/dev/fd' @@ -33,36 +33,36 @@ class System implements ISystem { throw new Exception('Cant find file descriptor path'); } - public function getSmbclientPath() { + public function getSmbclientPath(): ?string { return $this->getBinaryPath('smbclient'); } - public function getNetPath() { + public function getNetPath(): ?string { return $this->getBinaryPath('net'); } - public function getSmbcAclsPath() { + public function getSmbcAclsPath(): ?string { return $this->getBinaryPath('smbcacls'); } - public function getStdBufPath() { + public function getStdBufPath(): ?string { return $this->getBinaryPath('stdbuf'); } - public function getDatePath() { + public function getDatePath(): ?string { return $this->getBinaryPath('date'); } - public function libSmbclientAvailable() { + public function libSmbclientAvailable(): bool { return function_exists('smbclient_state_new'); } - protected function getBinaryPath($binary) { + protected function getBinaryPath(string $binary): ?string { if (!isset($this->paths[$binary])) { $result = null; $output = []; exec("which $binary 2>&1", $output, $result); - $this->paths[$binary] = $result === 0 ? trim(implode('', $output)) : false; + $this->paths[$binary] = $result === 0 ? trim(implode('', $output)) : null; } return $this->paths[$binary]; } |