minor type improvements

This commit is contained in:
Robin Appelman 2021-03-10 15:00:37 +01:00
commit b5c6921f2e
6 changed files with 17 additions and 17 deletions

View file

@ -33,8 +33,11 @@ class ACL {
const FLAG_OBJECT_INHERIT = 0x1;
const FLAG_CONTAINER_INHERIT = 0x2;
/** @var int */
private $type;
/** @var int */
private $flags;
/** @var int */
private $mask;
public function __construct(int $type, int $flags, int $mask) {

View file

@ -24,24 +24,16 @@ namespace Icewind\SMB;
abstract class AbstractServer implements IServer {
const LOCALE = 'en_US.UTF-8';
/**
* @var string $host
*/
/** @var string */
protected $host;
/**
* @var IAuth $user
*/
/** @var IAuth */
protected $auth;
/**
* @var ISystem
*/
/** @var ISystem */
protected $system;
/**
* @var ITimeZoneProvider
*/
/** @var ITimeZoneProvider */
protected $timezoneProvider;
/** @var IOptions */

View file

@ -9,7 +9,9 @@
namespace Icewind\SMB;
class Change {
/** @var int */
private $code;
/** @var string */
private $path;
public function __construct(int $code, string $path) {

View file

@ -206,10 +206,10 @@ class NativeState {
/**
* @param string $uri
* @return array
* @return array{"mtime": int, "size": int, "mode": int}
*/
public function stat(string $uri): array {
/** @var array $result */
/** @var array{"mtime": int, "size": int, "mode": int} $result */
$result = @smbclient_stat($this->state, $uri);
$this->testResult($result, $uri);
@ -219,10 +219,10 @@ class NativeState {
/**
* @param resource $file
* @param string $path
* @return array
* @return array{"mtime": int, "size": int, "mode": int}
*/
public function fstat($file, string $path): array {
/** @var array $result */
/** @var array{"mtime": int, "size": int, "mode": int} $result */
$result = @smbclient_fstat($this->state, $file);
$this->testResult($result, $path);

View file

@ -122,6 +122,9 @@ abstract class NativeStream implements File {
}
}
/**
* @return array{"mtime": int, "size": int, "mode": int}|false
*/
public function stream_stat() {
try {
return $this->state->stat($this->url);