Skip to content

Indent stubs inside global namespace blocks #7261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 67 additions & 67 deletions ext/ffi/ffi.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,102 +4,102 @@

namespace {

final class FFI
{
public static function cdef(string $code = "", ?string $lib = null): FFI {}
final class FFI
{
public static function cdef(string $code = "", ?string $lib = null): FFI {}

public static function load(string $filename): ?FFI {}
public static function load(string $filename): ?FFI {}

public static function scope(string $name): FFI {}
public static function scope(string $name): FFI {}

public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false): ?FFI\CData {}
public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false): ?FFI\CData {}

/** @prefer-ref $ptr */
public static function free(FFI\CData $ptr): void {}
/** @prefer-ref $ptr */
public static function free(FFI\CData $ptr): void {}

/**
* @param FFI\CData|int|float|bool|null $ptr
* @prefer-ref $ptr
*/
public static function cast(FFI\CType|string $type, $ptr): ?FFI\CData {}
/**
* @param FFI\CData|int|float|bool|null $ptr
* @prefer-ref $ptr
*/
public static function cast(FFI\CType|string $type, $ptr): ?FFI\CData {}

public static function type(string $type): ?FFI\CType {}
public static function type(string $type): ?FFI\CType {}

/** @prefer-ref $ptr */
public static function typeof(FFI\CData $ptr): FFI\CType {}
/** @prefer-ref $ptr */
public static function typeof(FFI\CData $ptr): FFI\CType {}

public static function arrayType(FFI\CType $type, array $dimensions): FFI\CType {}
public static function arrayType(FFI\CType $type, array $dimensions): FFI\CType {}

/** @prefer-ref $ptr */
public static function addr(FFI\CData $ptr): FFI\CData {}
/** @prefer-ref $ptr */
public static function addr(FFI\CData $ptr): FFI\CData {}

/** @prefer-ref $ptr */
public static function sizeof(FFI\CData|FFI\CType $ptr): int {}
/** @prefer-ref $ptr */
public static function sizeof(FFI\CData|FFI\CType $ptr): int {}

/** @prefer-ref $ptr */
public static function alignof(FFI\CData|FFI\CType $ptr): int {}
/** @prefer-ref $ptr */
public static function alignof(FFI\CData|FFI\CType $ptr): int {}

/**
* @param FFI\CData|string $from
* @prefer-ref $to
* @prefer-ref $from
*/
public static function memcpy(FFI\CData $to, $from, int $size): void {}
/**
* @param FFI\CData|string $from
* @prefer-ref $to
* @prefer-ref $from
*/
public static function memcpy(FFI\CData $to, $from, int $size): void {}

/**
* @prefer-ref $ptr1
* @param string|FFI\CData $ptr1
* @prefer-ref $ptr2
* @param string|FFI\CData $ptr2
*/
public static function memcmp($ptr1, $ptr2, int $size): int {}
/**
* @prefer-ref $ptr1
* @param string|FFI\CData $ptr1
* @prefer-ref $ptr2
* @param string|FFI\CData $ptr2
*/
public static function memcmp($ptr1, $ptr2, int $size): int {}

/** @prefer-ref $ptr */
public static function memset(FFI\CData $ptr, int $value, int $size): void {}
/** @prefer-ref $ptr */
public static function memset(FFI\CData $ptr, int $value, int $size): void {}

/** @prefer-ref $ptr */
public static function string(FFI\CData $ptr, ?int $size = null): string {}
/** @prefer-ref $ptr */
public static function string(FFI\CData $ptr, ?int $size = null): string {}

/** @prefer-ref $ptr */
public static function isNull(FFI\CData $ptr): bool {}
}
/** @prefer-ref $ptr */
public static function isNull(FFI\CData $ptr): bool {}
}

}

namespace FFI {

final class CData {
}
final class CData {
}

final class CType {
public function getName(): string {}
final class CType {
public function getName(): string {}

public function getKind(): int {}
public function getSize(): int {}
public function getAlignment(): int {}
public function getAttributes(): int {}
public function getKind(): int {}
public function getSize(): int {}
public function getAlignment(): int {}
public function getAttributes(): int {}

public function getEnumKind(): int {}
public function getEnumKind(): int {}

public function getArrayElementType(): CType {}
public function getArrayLength(): int {}
public function getArrayElementType(): CType {}
public function getArrayLength(): int {}

public function getPointerType(): CType {}
public function getPointerType(): CType {}

public function getStructFieldNames(): array {}
public function getStructFieldOffset(string $name): int {}
public function getStructFieldType(string $name): CType {}
public function getStructFieldNames(): array {}
public function getStructFieldOffset(string $name): int {}
public function getStructFieldType(string $name): CType {}

public function getFuncABI(): int {}
public function getFuncReturnType(): CType {}
public function getFuncParameterCount(): int {}
public function getFuncParameterType(int $index): CType {}
}
public function getFuncABI(): int {}
public function getFuncReturnType(): CType {}
public function getFuncParameterCount(): int {}
public function getFuncParameterType(int $index): CType {}
}

class Exception extends \Error {
}
class Exception extends \Error {
}

final class ParserException extends Exception {
}
final class ParserException extends Exception {
}

}
2 changes: 1 addition & 1 deletion ext/ffi/ffi_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 82f586480d2b29e6aa359f7080cdc7ea092a1ecc */
* Stub hash: c71ceb0ba6966559887dc7785da3840ad60f7ded */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
Expand Down
110 changes: 56 additions & 54 deletions ext/ftp/ftp.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,69 @@
/** @generate-class-entries */

namespace FTP {

/** @strict-properties */
final class Connection
{
}

}

namespace {

function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}

#ifdef HAVE_FTP_SSL
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
#endif

function ftp_login(FTP\Connection $ftp, string $username, string $password): bool {}
function ftp_pwd(FTP\Connection $ftp): string|false {}
function ftp_cdup(FTP\Connection $ftp): bool {}
function ftp_chdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_exec(FTP\Connection $ftp, string $command): bool {}
function ftp_raw(FTP\Connection $ftp, string $command): array {}
function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {}
function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {}

/** @param string $response */
function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {}
function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {}
function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {}
function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {}
function ftp_systype(FTP\Connection $ftp): string|false {}

/** @param resource $stream */
function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}

/** @param resource $stream */
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_nb_continue(FTP\Connection $ftp): int {}

/** @param resource $stream */
function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}

/** @param resource $stream */
function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
function ftp_size(FTP\Connection $ftp, string $filename): int {}
function ftp_mdtm(FTP\Connection $ftp, string $filename): int {}
function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {}
function ftp_delete(FTP\Connection $ftp, string $filename): bool {}
function ftp_site(FTP\Connection $ftp, string $command): bool {}
function ftp_close(FTP\Connection $ftp): bool {}

/** @alias ftp_close */
function ftp_quit(FTP\Connection $ftp): bool {}

/** @param int|bool $value */
function ftp_set_option(FTP\Connection $ftp, int $option, $value): bool {}
function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {}
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}

#ifdef HAVE_FTP_SSL
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
#endif

function ftp_login(FTP\Connection $ftp, string $username, string $password): bool {}
function ftp_pwd(FTP\Connection $ftp): string|false {}
function ftp_cdup(FTP\Connection $ftp): bool {}
function ftp_chdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_exec(FTP\Connection $ftp, string $command): bool {}
function ftp_raw(FTP\Connection $ftp, string $command): array {}
function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {}
function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {}
function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {}

/** @param string $response */
function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {}
function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {}
function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {}
function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {}
function ftp_systype(FTP\Connection $ftp): string|false {}

/** @param resource $stream */
function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}

/** @param resource $stream */
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_nb_continue(FTP\Connection $ftp): int {}

/** @param resource $stream */
function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}

/** @param resource $stream */
function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
function ftp_size(FTP\Connection $ftp, string $filename): int {}
function ftp_mdtm(FTP\Connection $ftp, string $filename): int {}
function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {}
function ftp_delete(FTP\Connection $ftp, string $filename): bool {}
function ftp_site(FTP\Connection $ftp, string $command): bool {}
function ftp_close(FTP\Connection $ftp): bool {}

/** @alias ftp_close */
function ftp_quit(FTP\Connection $ftp): bool {}

/** @param int|bool $value */
function ftp_set_option(FTP\Connection $ftp, int $option, $value): bool {}
function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {}

}
2 changes: 1 addition & 1 deletion ext/ftp/ftp_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 0ea788bc7779d9c340b9fb3ad72fa0571df9341e */
* Stub hash: 76ede60b204ea03938cde1d71c58defd537ab4c0 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTP\\Connection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
Expand Down
Loading