Skip to content

Commit 1b0ead5

Browse files
committed
Add true return type to methods in mysqli
1 parent c7f5f1d commit 1b0ead5

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

ext/mysqli/mysqli.stub.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,10 @@ public function change_user(string $username, #[\SensitiveParameter] string $pas
774774
public function character_set_name(): string {}
775775

776776
/**
777-
* @return true
778777
* @alias mysqli_close
779778
* @no-verify
780779
*/
781-
public function close() {} // TODO make return type void
780+
public function close(): true {} // TODO make return type void
782781

783782
/**
784783
* @tentative-return-type
@@ -807,11 +806,10 @@ public function connect(
807806
public function dump_debug_info(): bool {}
808807

809808
/**
810-
* @return true
811809
* @alias mysqli_debug
812810
* @no-verify Should really be a static method
813811
*/
814-
public function debug(string $options) {} // TODO make return type void
812+
public function debug(string $options): true {} // TODO make return type void
815813

816814
/**
817815
* @tentative-return-type
@@ -987,7 +985,6 @@ public function options(int $option, $value): bool {}
987985
public function set_opt(int $option, $value): bool {}
988986

989987
/**
990-
* @return true
991988
* @alias mysqli_ssl_set
992989
* @no-verify
993990
*/
@@ -997,7 +994,7 @@ public function ssl_set(
997994
?string $ca_certificate,
998995
?string $ca_path,
999996
?string $cipher_algos
1000-
) {} // TODO make return type void
997+
): true {} // TODO make return type void
1001998

1002999
/**
10031000
* @tentative-return-type
@@ -1144,7 +1141,7 @@ public function fetch_column(int $column = 0): null|int|float|string|false {}
11441141
* @tentative-return-type
11451142
* @alias mysqli_field_seek
11461143
*/
1147-
public function field_seek(int $index): bool {}
1144+
public function field_seek(int $index): true {}
11481145

11491146
/**
11501147
* @tentative-return-type
@@ -1240,11 +1237,10 @@ public function bind_param(string $types, mixed &...$vars): bool {}
12401237
public function bind_result(mixed &...$vars): bool {}
12411238

12421239
/**
1243-
* @return true
12441240
* @alias mysqli_stmt_close
12451241
* @no-verify
12461242
*/
1247-
public function close() {} // TODO make return type void
1243+
public function close(): true {} // TODO make return type void
12481244

12491245
/**
12501246
* @tentative-return-type

ext/mysqli/mysqli_arginfo.h

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)