Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit b5c6921

Browse files
committed
minor type improvements
1 parent 144439d commit b5c6921

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: composer install
3434
- env:
3535
BACKEND: smbclient
36-
run: php ./vendor/bin/phpstan analyse --level 5 src
36+
run: php ./vendor/bin/phpstan analyse --level 6 src
3737

3838
phpunit:
3939
runs-on: ubuntu-20.04

src/ACL.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ class ACL {
3333
const FLAG_OBJECT_INHERIT = 0x1;
3434
const FLAG_CONTAINER_INHERIT = 0x2;
3535

36+
/** @var int */
3637
private $type;
38+
/** @var int */
3739
private $flags;
40+
/** @var int */
3841
private $mask;
3942

4043
public function __construct(int $type, int $flags, int $mask) {

src/AbstractServer.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,16 @@
2424
abstract class AbstractServer implements IServer {
2525
const LOCALE = 'en_US.UTF-8';
2626

27-
/**
28-
* @var string $host
29-
*/
27+
/** @var string */
3028
protected $host;
3129

32-
/**
33-
* @var IAuth $user
34-
*/
30+
/** @var IAuth */
3531
protected $auth;
3632

37-
/**
38-
* @var ISystem
39-
*/
33+
/** @var ISystem */
4034
protected $system;
4135

42-
/**
43-
* @var ITimeZoneProvider
44-
*/
36+
/** @var ITimeZoneProvider */
4537
protected $timezoneProvider;
4638

4739
/** @var IOptions */

src/Change.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
namespace Icewind\SMB;
1010

1111
class Change {
12+
/** @var int */
1213
private $code;
14+
/** @var string */
1315
private $path;
1416

1517
public function __construct(int $code, string $path) {

src/Native/NativeState.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ public function rmdir(string $uri): bool {
206206

207207
/**
208208
* @param string $uri
209-
* @return array
209+
* @return array{"mtime": int, "size": int, "mode": int}
210210
*/
211211
public function stat(string $uri): array {
212-
/** @var array $result */
212+
/** @var array{"mtime": int, "size": int, "mode": int} $result */
213213
$result = @smbclient_stat($this->state, $uri);
214214

215215
$this->testResult($result, $uri);
@@ -219,10 +219,10 @@ public function stat(string $uri): array {
219219
/**
220220
* @param resource $file
221221
* @param string $path
222-
* @return array
222+
* @return array{"mtime": int, "size": int, "mode": int}
223223
*/
224224
public function fstat($file, string $path): array {
225-
/** @var array $result */
225+
/** @var array{"mtime": int, "size": int, "mode": int} $result */
226226
$result = @smbclient_fstat($this->state, $file);
227227

228228
$this->testResult($result, $path);

src/Native/NativeStream.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public function stream_seek($offset, $whence = SEEK_SET) {
122122
}
123123
}
124124

125+
/**
126+
* @return array{"mtime": int, "size": int, "mode": int}|false
127+
*/
125128
public function stream_stat() {
126129
try {
127130
return $this->state->stat($this->url);

0 commit comments

Comments
 (0)