Skip to content

Commit 8e531b5

Browse files
committed
Update ext/odbc parameter names
Closes GH-6303.
1 parent e86a6ce commit 8e531b5

File tree

2 files changed

+138
-138
lines changed

2 files changed

+138
-138
lines changed

ext/odbc/odbc.stub.php

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -4,193 +4,193 @@
44

55
function odbc_close_all(): void {}
66

7-
/** @param resource $result_id */
8-
function odbc_binmode($result_id, int $mode): bool {}
7+
/** @param resource $statement */
8+
function odbc_binmode($statement, int $mode): bool {}
99

10-
/** @param resource $result_id */
11-
function odbc_longreadlen($result_id, int $length): bool {}
10+
/** @param resource $statement */
11+
function odbc_longreadlen($statement, int $length): bool {}
1212

1313
/**
14-
* @param resource $connection_id
14+
* @param resource $odbc
1515
* @return resource|false
1616
*/
17-
function odbc_prepare($connection_id, string $query) {}
17+
function odbc_prepare($odbc, string $query) {}
1818

19-
/** @param resource $result_id */
20-
function odbc_execute($result_id, array $parameters_array = []): bool {}
19+
/** @param resource $statement */
20+
function odbc_execute($statement, array $params = []): bool {}
2121

22-
/** @param resource $result_id */
23-
function odbc_cursor($result_id): string|false {}
22+
/** @param resource $statement */
23+
function odbc_cursor($statement): string|false {}
2424

2525
#ifdef HAVE_SQLDATASOURCES
26-
/** @param resource $connection_id */
27-
function odbc_data_source($connection_id, int $fetch_type): array|false {}
26+
/** @param resource $odbc */
27+
function odbc_data_source($odbc, int $fetch_type): array|false {}
2828
#endif
2929

3030
/**
31-
* @param resource $connection_id
31+
* @param resource $odbc
3232
* @return resource|false
3333
*/
34-
function odbc_exec($connection_id, string $query) {}
34+
function odbc_exec($odbc, string $query) {}
3535

3636
/**
37-
* @param resource $connection_id
37+
* @param resource $odbc
3838
* @return resource|false
3939
* @alias odbc_exec
4040
*/
41-
function odbc_do($connection_id, string $query) {}
41+
function odbc_do($odbc, string $query) {}
4242

4343
#ifdef PHP_ODBC_HAVE_FETCH_HASH
44-
/** @param resource $result */
45-
function odbc_fetch_object($result, int $rownumber = -1): stdClass|false {}
44+
/** @param resource $statement */
45+
function odbc_fetch_object($statement, int $row = -1): stdClass|false {}
4646

47-
/** @param resource $result */
48-
function odbc_fetch_array($result, int $rownumber = -1): array|false {}
47+
/** @param resource $statement */
48+
function odbc_fetch_array($statement, int $row = -1): array|false {}
4949
#endif
5050

5151
/**
52-
* @param resource $result_id
53-
* @param array $result_array
52+
* @param resource $statement
53+
* @param array $array
5454
*/
55-
function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0): int|false {}
55+
function odbc_fetch_into($statement, &$array, int $row = 0): int|false {}
5656

57-
/** @param resource $result_id */
58-
function odbc_fetch_row($result_id, ?int $row_number = null): bool {}
57+
/** @param resource $statement */
58+
function odbc_fetch_row($statement, ?int $row = null): bool {}
5959

60-
/** @param resource $result_id */
61-
function odbc_result($result_id, string|int $field): string|bool|null {}
60+
/** @param resource $statement */
61+
function odbc_result($statement, string|int $field): string|bool|null {}
6262

63-
/** @param resource $result_id */
64-
function odbc_result_all($result_id, string $format = ""): int|false {}
63+
/** @param resource $statement */
64+
function odbc_result_all($statement, string $format = ""): int|false {}
6565

66-
/** @param resource $result_id */
67-
function odbc_free_result($result_id): bool {}
66+
/** @param resource $statement */
67+
function odbc_free_result($statement): bool {}
6868

6969
/** @return resource|false */
7070
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
7171

7272
/** @return resource|false */
7373
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}
7474

75-
/** @param resource $connection_id */
76-
function odbc_close($connection_id): void {}
75+
/** @param resource $odbc */
76+
function odbc_close($odbc): void {}
7777

78-
/** @param resource $result_id */
79-
function odbc_num_rows($result_id): int {}
78+
/** @param resource $statement */
79+
function odbc_num_rows($statement): int {}
8080

8181
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
82-
/** @param resource $result_id */
83-
function odbc_next_result($result_id): bool {}
82+
/** @param resource $statement */
83+
function odbc_next_result($statement): bool {}
8484
#endif
8585

86-
/** @param resource $result_id */
87-
function odbc_num_fields($result_id): int {}
86+
/** @param resource $statement */
87+
function odbc_num_fields($statement): int {}
8888

89-
/** @param resource $result_id */
90-
function odbc_field_name($result_id, int $field_number): string|false {}
89+
/** @param resource $statement */
90+
function odbc_field_name($statement, int $field): string|false {}
9191

92-
/** @param resource $result_id */
93-
function odbc_field_type($result_id, int $field_number): string|false {}
92+
/** @param resource $statement */
93+
function odbc_field_type($statement, int $field): string|false {}
9494

95-
/** @param resource $result_id */
96-
function odbc_field_len($result_id, int $field_number): int|false {}
95+
/** @param resource $statement */
96+
function odbc_field_len($statement, int $field): int|false {}
9797

9898
/**
99-
* @param resource $result_id
99+
* @param resource $statement
100100
* @alias odbc_field_len
101101
*/
102-
function odbc_field_precision($result_id, int $field_number): int|false {}
102+
function odbc_field_precision($statement, int $field): int|false {}
103103

104-
/** @param resource $result_id */
105-
function odbc_field_scale($result_id, int $field_number): int|false {}
104+
/** @param resource $statement */
105+
function odbc_field_scale($statement, int $field): int|false {}
106106

107-
/** @param resource $result_id */
108-
function odbc_field_num($result_id, string $field_name): int|false {}
107+
/** @param resource $statement */
108+
function odbc_field_num($statement, string $field): int|false {}
109109

110-
/** @param resource $connection_id */
111-
function odbc_autocommit($connection_id, bool $onoff = false): int|bool {}
110+
/** @param resource $odbc */
111+
function odbc_autocommit($odbc, bool $enable = false): int|bool {}
112112

113-
/** @param resource $connection_id */
114-
function odbc_commit($connection_id): bool {}
113+
/** @param resource $odbc */
114+
function odbc_commit($odbc): bool {}
115115

116-
/** @param resource $connection_id */
117-
function odbc_rollback($connection_id): bool {}
116+
/** @param resource $odbc */
117+
function odbc_rollback($odbc): bool {}
118118

119-
/** @param resource|null $connection_id */
120-
function odbc_error($connection_id = null): string {}
119+
/** @param resource|null $odbc */
120+
function odbc_error($odbc = null): string {}
121121

122-
/** @param resource|null $connection_id */
123-
function odbc_errormsg($connection_id = null): string {}
122+
/** @param resource|null $odbc */
123+
function odbc_errormsg($odbc = null): string {}
124124

125-
/** @param resource $conn_id */
126-
function odbc_setoption($conn_id, int $which, int $option, int $value): bool {}
125+
/** @param resource $odbc */
126+
function odbc_setoption($odbc, int $which, int $option, int $value): bool {}
127127

128128
/**
129-
* @param resource $connection_id
129+
* @param resource $odbc
130130
* @return resource|false
131131
*/
132-
function odbc_tables($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null, ?string $table_types = null) {}
132+
function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null) {}
133133

134134
/**
135-
* @param resource $connection_id
135+
* @param resource $odbc
136136
* @return resource|false
137137
*/
138-
function odbc_columns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $table_name = null, ?string $column_name = null) {}
138+
function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) {}
139139

140140
/**
141-
* @param resource $connection_id
141+
* @param resource $odbc
142142
* @return resource|false
143143
*/
144-
function odbc_gettypeinfo($connection_id, int $data_type = 0) {}
144+
function odbc_gettypeinfo($odbc, int $data_type = 0) {}
145145

146146
/**
147-
* @param resource $connection_id
147+
* @param resource $odbc
148148
* @return resource|false
149149
*/
150-
function odbc_primarykeys($connection_id, ?string $catalog, string $schema, string $table) {}
150+
function odbc_primarykeys($odbc, ?string $catalog, string $schema, string $table) {}
151151

152152
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
153153
/**
154-
* @param resource $connection_id
154+
* @param resource $odbc
155155
* @return resource|false
156156
*/
157-
function odbc_procedurecolumns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $proc = null, ?string $column = null) {}
157+
function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) {}
158158

159159
/**
160-
* @param resource $connection_id
160+
* @param resource $odbc
161161
* @return resource|false
162162
*/
163-
function odbc_procedures($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null) {}
163+
function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null) {}
164164

165165
/**
166-
* @param resource $connection_id
166+
* @param resource $odbc
167167
* @return resource|false
168168
*/
169-
function odbc_foreignkeys($connection_id, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {}
169+
function odbc_foreignkeys($odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {}
170170
#endif
171171

172172
/**
173-
* @param resource $connection_id
173+
* @param resource $odbc
174174
* @return resource|false
175175
*/
176-
function odbc_specialcolumns($connection_id, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {}
176+
function odbc_specialcolumns($odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {}
177177

178178
/**
179-
* @param resource $connection_id
179+
* @param resource $odbc
180180
* @return resource|false
181181
*/
182-
function odbc_statistics($connection_id, ?string $catalog, string $schema, string $name, int $unique, int $accuracy) {}
182+
function odbc_statistics($odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy) {}
183183

184184
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
185185
/**
186-
* @param resource $connection_id
186+
* @param resource $odbc
187187
* @return resource|false
188188
*/
189-
function odbc_tableprivileges($connection_id, ?string $catalog, string $schema, string $name) {}
189+
function odbc_tableprivileges($odbc, ?string $catalog, string $schema, string $table) {}
190190

191191
/**
192-
* @param resource $connection_id
192+
* @param resource $odbc
193193
* @return resource|false
194194
*/
195-
function odbc_columnprivileges($connection_id, ?string $catalog, string $schema, string $table, string $column) {}
195+
function odbc_columnprivileges($odbc, ?string $catalog, string $schema, string $table, string $column) {}
196196
#endif

0 commit comments

Comments
 (0)