Skip to content

Commit 7820eab

Browse files
committed
Review
1 parent f7b3aab commit 7820eab

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

ext/mysqli/mysqli.stub.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function real_query(string $query);
119119
public function release_savepoint(string $name);
120120

121121
/** @return bool */
122-
public function rollback(?int $flags = 0, ?string $name = '');
122+
public function rollback(int $flags = 0, string $name = '');
123123

124124
/** @return bool */
125125
public function savepoint(string $name);
@@ -175,11 +175,9 @@ public function refresh(int $options);
175175
class mysqli_warning
176176
{
177177
/**
178-
* mysqli_link|mysqli_stmt $mysqli_link
179-
*
180178
* @return object|false
181179
*/
182-
public function __construct();
180+
public function __construct(object $mysqli_link);
183181

184182
/** @return bool */
185183
public function next();
@@ -188,12 +186,9 @@ public function next();
188186
class mysqli_result
189187
{
190188
/**
191-
* mysqli $mysqli_link,
192-
* int $resmode = MYSQLI_STORE_RESULT
193-
*
194189
* @return object|false
195190
*/
196-
public function __construct();
191+
public function __construct(object $mysqli_link, int $resmode = MYSQLI_STORE_RESULT);
197192

198193
/** @return void */
199194
public function close();
@@ -258,7 +253,7 @@ public function bind_result(&...$vars);
258253
/** @return bool */
259254
public function close();
260255

261-
/** @return void|false */
256+
/** @return null|false */
262257
public function data_seek(int $offset);
263258

264259
/** @return bool */
@@ -449,7 +444,7 @@ function mysqli_reap_async_query(mysqli $mysqli_link): mysqli_result|bool {}
449444

450445
function mysqli_release_savepoint(mysqli $mysqli_link, string $name): bool {}
451446

452-
function mysqli_rollback(mysqli $mysqli_link, ?int $flags = 0, ?string $name = ''): bool {}
447+
function mysqli_rollback(mysqli $mysqli_link, int $flags = 0, string $name = ''): bool {}
453448

454449
function mysqli_savepoint(mysqli $mysqli_link, string $name): bool {}
455450

@@ -471,7 +466,7 @@ function mysqli_stmt_bind_result(mysqli_stmt $mysql_stmt, &...$vars): bool {}
471466

472467
function mysqli_stmt_close(mysqli_stmt $mysql_stmt): bool {}
473468

474-
/** @return void|false */
469+
/** @return null|false */
475470
function mysqli_stmt_data_seek(mysqli_stmt $mysql_stmt, int $offset) {}
476471

477472
function mysqli_stmt_errno(mysqli_stmt $mysql_stmt): int {}
@@ -513,10 +508,10 @@ function mysqli_stmt_send_long_data(mysqli_stmt $mysql_stmt, int $param_nr, stri
513508

514509
function mysqli_stmt_store_result(mysqli_stmt $mysql_stmt): bool {}
515510

516-
/** @return string|void */
511+
/** @return string|null */
517512
function mysqli_stmt_sqlstate(mysqli_stmt $mysql_stmt) {}
518513

519-
/** @return string|void */
514+
/** @return string|null */
520515
function mysqli_sqlstate(mysqli $mysqli_link) {}
521516

522517
function mysqli_ssl_set(

ext/mysqli/mysqli_arginfo.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1)
104104
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
105105
ZEND_END_ARG_INFO()
106106

107-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_rollback, 0, 0, 0)
108-
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 1)
109-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1)
110-
ZEND_END_ARG_INFO()
107+
#define arginfo_class_mysqli_rollback arginfo_class_mysqli_begin_transaction
111108

112109
#define arginfo_class_mysqli_savepoint arginfo_class_mysqli_release_savepoint
113110

@@ -150,11 +147,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1)
150147
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
151148
ZEND_END_ARG_INFO()
152149

153-
#define arginfo_class_mysqli_warning___construct arginfo_class_mysqli_character_set_name
150+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_warning___construct, 0, 0, 1)
151+
ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0)
152+
ZEND_END_ARG_INFO()
154153

155154
#define arginfo_class_mysqli_warning_next arginfo_class_mysqli_character_set_name
156155

157-
#define arginfo_class_mysqli_result___construct arginfo_class_mysqli_character_set_name
156+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1)
157+
ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0)
158+
ZEND_ARG_TYPE_INFO(0, resmode, IS_LONG, 0)
159+
ZEND_END_ARG_INFO()
158160

159161
#define arginfo_class_mysqli_result_close arginfo_class_mysqli_character_set_name
160162

@@ -499,8 +501,8 @@ ZEND_END_ARG_INFO()
499501

500502
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_rollback, 0, 1, _IS_BOOL, 0)
501503
ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0)
502-
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 1)
503-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1)
504+
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
505+
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
504506
ZEND_END_ARG_INFO()
505507

506508
#define arginfo_mysqli_savepoint arginfo_mysqli_release_savepoint

0 commit comments

Comments
 (0)