Skip to content

Commit b382883

Browse files
authored
Indent stubs inside global namespace blocks (#7261)
1 parent 977c3d1 commit b382883

14 files changed

+449
-436
lines changed

ext/ffi/ffi.stub.php

+67-67
Original file line numberDiff line numberDiff line change
@@ -4,102 +4,102 @@
44

55
namespace {
66

7-
final class FFI
8-
{
9-
public static function cdef(string $code = "", ?string $lib = null): FFI {}
7+
final class FFI
8+
{
9+
public static function cdef(string $code = "", ?string $lib = null): FFI {}
1010

11-
public static function load(string $filename): ?FFI {}
11+
public static function load(string $filename): ?FFI {}
1212

13-
public static function scope(string $name): FFI {}
13+
public static function scope(string $name): FFI {}
1414

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

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

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

26-
public static function type(string $type): ?FFI\CType {}
26+
public static function type(string $type): ?FFI\CType {}
2727

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

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

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

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

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

42-
/**
43-
* @param FFI\CData|string $from
44-
* @prefer-ref $to
45-
* @prefer-ref $from
46-
*/
47-
public static function memcpy(FFI\CData $to, $from, int $size): void {}
42+
/**
43+
* @param FFI\CData|string $from
44+
* @prefer-ref $to
45+
* @prefer-ref $from
46+
*/
47+
public static function memcpy(FFI\CData $to, $from, int $size): void {}
4848

49-
/**
50-
* @prefer-ref $ptr1
51-
* @param string|FFI\CData $ptr1
52-
* @prefer-ref $ptr2
53-
* @param string|FFI\CData $ptr2
54-
*/
55-
public static function memcmp($ptr1, $ptr2, int $size): int {}
49+
/**
50+
* @prefer-ref $ptr1
51+
* @param string|FFI\CData $ptr1
52+
* @prefer-ref $ptr2
53+
* @param string|FFI\CData $ptr2
54+
*/
55+
public static function memcmp($ptr1, $ptr2, int $size): int {}
5656

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

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

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

6767
}
6868

6969
namespace FFI {
7070

71-
final class CData {
72-
}
71+
final class CData {
72+
}
7373

74-
final class CType {
75-
public function getName(): string {}
74+
final class CType {
75+
public function getName(): string {}
7676

77-
public function getKind(): int {}
78-
public function getSize(): int {}
79-
public function getAlignment(): int {}
80-
public function getAttributes(): int {}
77+
public function getKind(): int {}
78+
public function getSize(): int {}
79+
public function getAlignment(): int {}
80+
public function getAttributes(): int {}
8181

82-
public function getEnumKind(): int {}
82+
public function getEnumKind(): int {}
8383

84-
public function getArrayElementType(): CType {}
85-
public function getArrayLength(): int {}
84+
public function getArrayElementType(): CType {}
85+
public function getArrayLength(): int {}
8686

87-
public function getPointerType(): CType {}
87+
public function getPointerType(): CType {}
8888

89-
public function getStructFieldNames(): array {}
90-
public function getStructFieldOffset(string $name): int {}
91-
public function getStructFieldType(string $name): CType {}
89+
public function getStructFieldNames(): array {}
90+
public function getStructFieldOffset(string $name): int {}
91+
public function getStructFieldType(string $name): CType {}
9292

93-
public function getFuncABI(): int {}
94-
public function getFuncReturnType(): CType {}
95-
public function getFuncParameterCount(): int {}
96-
public function getFuncParameterType(int $index): CType {}
97-
}
93+
public function getFuncABI(): int {}
94+
public function getFuncReturnType(): CType {}
95+
public function getFuncParameterCount(): int {}
96+
public function getFuncParameterType(int $index): CType {}
97+
}
9898

99-
class Exception extends \Error {
100-
}
99+
class Exception extends \Error {
100+
}
101101

102-
final class ParserException extends Exception {
103-
}
102+
final class ParserException extends Exception {
103+
}
104104

105105
}

ext/ffi/ffi_arginfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 82f586480d2b29e6aa359f7080cdc7ea092a1ecc */
2+
* Stub hash: c71ceb0ba6966559887dc7785da3840ad60f7ded */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")

ext/ftp/ftp.stub.php

+56-54
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,69 @@
33
/** @generate-class-entries */
44

55
namespace FTP {
6+
67
/** @strict-properties */
78
final class Connection
89
{
910
}
11+
1012
}
1113

1214
namespace {
1315

14-
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
15-
16-
#ifdef HAVE_FTP_SSL
17-
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
18-
#endif
19-
20-
function ftp_login(FTP\Connection $ftp, string $username, string $password): bool {}
21-
function ftp_pwd(FTP\Connection $ftp): string|false {}
22-
function ftp_cdup(FTP\Connection $ftp): bool {}
23-
function ftp_chdir(FTP\Connection $ftp, string $directory): bool {}
24-
function ftp_exec(FTP\Connection $ftp, string $command): bool {}
25-
function ftp_raw(FTP\Connection $ftp, string $command): array {}
26-
function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {}
27-
function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {}
28-
function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {}
29-
30-
/** @param string $response */
31-
function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {}
32-
function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {}
33-
function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {}
34-
function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {}
35-
function ftp_systype(FTP\Connection $ftp): string|false {}
36-
37-
/** @param resource $stream */
38-
function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
39-
40-
/** @param resource $stream */
41-
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
42-
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
43-
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
44-
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
45-
function ftp_nb_continue(FTP\Connection $ftp): int {}
46-
47-
/** @param resource $stream */
48-
function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}
49-
50-
/** @param resource $stream */
51-
function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
52-
function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
53-
function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
54-
function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
55-
function ftp_size(FTP\Connection $ftp, string $filename): int {}
56-
function ftp_mdtm(FTP\Connection $ftp, string $filename): int {}
57-
function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {}
58-
function ftp_delete(FTP\Connection $ftp, string $filename): bool {}
59-
function ftp_site(FTP\Connection $ftp, string $command): bool {}
60-
function ftp_close(FTP\Connection $ftp): bool {}
61-
62-
/** @alias ftp_close */
63-
function ftp_quit(FTP\Connection $ftp): bool {}
64-
65-
/** @param int|bool $value */
66-
function ftp_set_option(FTP\Connection $ftp, int $option, $value): bool {}
67-
function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {}
16+
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
17+
18+
#ifdef HAVE_FTP_SSL
19+
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {}
20+
#endif
21+
22+
function ftp_login(FTP\Connection $ftp, string $username, string $password): bool {}
23+
function ftp_pwd(FTP\Connection $ftp): string|false {}
24+
function ftp_cdup(FTP\Connection $ftp): bool {}
25+
function ftp_chdir(FTP\Connection $ftp, string $directory): bool {}
26+
function ftp_exec(FTP\Connection $ftp, string $command): bool {}
27+
function ftp_raw(FTP\Connection $ftp, string $command): array {}
28+
function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {}
29+
function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {}
30+
function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {}
31+
32+
/** @param string $response */
33+
function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {}
34+
function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {}
35+
function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {}
36+
function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {}
37+
function ftp_systype(FTP\Connection $ftp): string|false {}
38+
39+
/** @param resource $stream */
40+
function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
41+
42+
/** @param resource $stream */
43+
function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
44+
function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {}
45+
function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
46+
function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
47+
function ftp_nb_continue(FTP\Connection $ftp): int {}
48+
49+
/** @param resource $stream */
50+
function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}
51+
52+
/** @param resource $stream */
53+
function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
54+
function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
55+
function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
56+
function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
57+
function ftp_size(FTP\Connection $ftp, string $filename): int {}
58+
function ftp_mdtm(FTP\Connection $ftp, string $filename): int {}
59+
function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {}
60+
function ftp_delete(FTP\Connection $ftp, string $filename): bool {}
61+
function ftp_site(FTP\Connection $ftp, string $command): bool {}
62+
function ftp_close(FTP\Connection $ftp): bool {}
63+
64+
/** @alias ftp_close */
65+
function ftp_quit(FTP\Connection $ftp): bool {}
66+
67+
/** @param int|bool $value */
68+
function ftp_set_option(FTP\Connection $ftp, int $option, $value): bool {}
69+
function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {}
6870

6971
}

ext/ftp/ftp_arginfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 0ea788bc7779d9c340b9fb3ad72fa0571df9341e */
2+
* Stub hash: 76ede60b204ea03938cde1d71c58defd537ab4c0 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTP\\Connection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)

0 commit comments

Comments
 (0)