mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
type fixes
This commit is contained in:
parent
1e7e500b64
commit
515b42586e
2 changed files with 14 additions and 4 deletions
|
|
@ -118,13 +118,23 @@ class NativeState {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function readdir($dir, string $path): array {
|
/**
|
||||||
|
* @param resource $dir
|
||||||
|
* @param string $path
|
||||||
|
* @return array|false
|
||||||
|
*/
|
||||||
|
public function readdir($dir, string $path) {
|
||||||
$result = @smbclient_readdir($this->state, $dir);
|
$result = @smbclient_readdir($this->state, $dir);
|
||||||
|
|
||||||
$this->testResult($result, $path);
|
$this->testResult($result, $path);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param resource $dir
|
||||||
|
* @param string $path
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function closedir($dir, string $path): bool {
|
public function closedir($dir, string $path): bool {
|
||||||
$result = smbclient_closedir($this->state, $dir);
|
$result = smbclient_closedir($this->state, $dir);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class TimeZoneProviderTest extends TestCase {
|
||||||
|
|
||||||
public function testFQDNNoNet() {
|
public function testFQDNNoNet() {
|
||||||
$this->system->method('getNetPath')
|
$this->system->method('getNetPath')
|
||||||
->willReturn(false);
|
->willReturn(null);
|
||||||
$this->system->method('getDatePath')
|
$this->system->method('getDatePath')
|
||||||
->willReturn($this->getDummyCommand("+700"));
|
->willReturn($this->getDummyCommand("+700"));
|
||||||
|
|
||||||
|
|
@ -70,9 +70,9 @@ class TimeZoneProviderTest extends TestCase {
|
||||||
|
|
||||||
public function testNoNetNoDate() {
|
public function testNoNetNoDate() {
|
||||||
$this->system->method('getNetPath')
|
$this->system->method('getNetPath')
|
||||||
->willReturn(false);
|
->willReturn(null);
|
||||||
$this->system->method('getDatePath')
|
$this->system->method('getDatePath')
|
||||||
->willReturn(false);
|
->willReturn(null);
|
||||||
|
|
||||||
$this->assertEquals(date_default_timezone_get(), $this->provider->get('foo.bar.com'));
|
$this->assertEquals(date_default_timezone_get(), $this->provider->get('foo.bar.com'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue