stub fixes

This commit is contained in:
Robin Appelman 2025-10-25 21:43:15 +02:00
commit 2bbc37a55d
4 changed files with 19 additions and 7 deletions

View file

@ -16,7 +16,7 @@ indent_size=2
indent_style=tab
tab_width=4
[{*.module,*.hphp,*.phtml,*.php5,*.php4,*.php,*.phpstub,*.inc}]
[{*.module,*.hphp,*.phtml,*.php5,*.php4,*.php,*.stub,*.inc}]
indent_style=tab
tab_width=4

View file

@ -9,8 +9,8 @@
ensureOverrideAttribute="false"
>
<stubs>
<file name="tests/krb.phpstub" preloadClasses="true"/>
<file name="tests/smbclient.phpstub" preloadClasses="true"/>
<file name="stubs/krb.stub" preloadClasses="true"/>
<file name="stubs/smbclient.stub" preloadClasses="true"/>
</stubs>
<projectFiles>
<directory name="src" />

View file

@ -6,14 +6,23 @@
*/
class KRB5CCache {
/**
* @return string[]
*/
public function getEntries(): array {
return [];
}
public function getName(): string {
return "";
}
/**
* @param string[] $flags
*/
public function initKeytab(string $principal, string $keytab, array $flags = []): void {
}
/**
* @param string[] $flags
*/
public function initPassword(string $principal, string $password, array $flags = []): void {
}
public function isValid(): bool {

View file

@ -59,8 +59,7 @@ function smbclient_option_set($state, int $option, $value) {
#if HAVE_SMBC_SETOPTIONPROTOCOLS
/**
* @param resource $state
* @param mixed $value
* @return mixed
* @return bool
*/
function smbclient_client_protocols($state, string $minproto = null, string $maxproto = null): bool {
}
@ -77,6 +76,7 @@ function smbclient_opendir($state, string $path) {
/**
* @param resource $state
* @param resource $dir
* @return false|string[]
*/
function smbclient_readdir($state, $dir): false|array {
}
@ -90,7 +90,7 @@ function smbclient_closedir($state, $dir): bool {
/**
* @param resource $state
* @return false|resource
* @return false|array<string|int,int>
*/
function smbclient_stat($state, string $path): false|array {
}
@ -98,6 +98,7 @@ function smbclient_stat($state, string $path): false|array {
/**
* @param resource $state
* @param resource $file
* @return false|array<string|int,int>
*/
function smbclient_fstat($state, $file): false|array {
}
@ -190,6 +191,7 @@ function smbclient_utimes($state, string $path, int $mtime = -1, int $atime = -1
/**
* @param resource $state
* @return false|string[]
*/
function smbclient_listxattr($state, string $path): false|array {
}
@ -214,7 +216,7 @@ function smbclient_removexattr($state, string $path, string $name): bool {
/**
* @param resource $state
* @return false|resource
* @return false|array<string|int,int>
*/
function smbclient_statvfs($state, string $path): false|array {
}
@ -222,6 +224,7 @@ function smbclient_statvfs($state, string $path): false|array {
/**
* @param resource $state
* @param resource $file
* @return false|array<string|int,int>
*/
function smbclient_fstatvfs($state, $file): false|array {
}