Skip to content

Commit 28b4d46

Browse files
authored
PHPC-2015: Fix wrong return types in stubs (#1348)
1 parent c99a856 commit 28b4d46

6 files changed

+9
-9
lines changed

src/MongoDB/Monitoring/CommandFailedEvent.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final public function getCommandName(): string {}
1515

1616
final public function getDurationMicros(): int {}
1717

18-
final public function getError(): \Throwable {}
18+
final public function getError(): \Exception {}
1919

2020
final public function getOperationId(): string {}
2121

src/MongoDB/Monitoring/CommandFailedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
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: 93e23af417425d45e8222ae0fd89b02ef5eb25a2 */
2+
* Stub hash: 008d718040430e0251e01cf2fa8da4e1ed4370d6 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()
@@ -10,7 +10,7 @@ ZEND_END_ARG_INFO()
1010
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent_getDurationMicros, 0, 0, IS_LONG, 0)
1111
ZEND_END_ARG_INFO()
1212

13-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent_getError, 0, 0, Throwable, 0)
13+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent_getError, 0, 0, Exception, 0)
1414
ZEND_END_ARG_INFO()
1515

1616
#define arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent_getOperationId arginfo_class_MongoDB_Driver_Monitoring_CommandFailedEvent_getCommandName

src/MongoDB/Monitoring/ServerHeartbeatFailedEvent.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final private function __construct() {}
1313

1414
final public function getDurationMicros() : int{}
1515

16-
final public function getError(): \Throwable {}
16+
final public function getError(): \Exception {}
1717

1818
final public function getPort(): int {}
1919

src/MongoDB/Monitoring/ServerHeartbeatFailedEvent_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: b8fb8dfe7e269cc0737210f5f2e92fd5359728eb */
2+
* Stub hash: 110a67ba94066498759282d2f7ca4b865068dbb0 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()
66

77
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent_getDurationMicros, 0, 0, IS_LONG, 0)
88
ZEND_END_ARG_INFO()
99

10-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent_getError, 0, 0, Throwable, 0)
10+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent_getError, 0, 0, Exception, 0)
1111
ZEND_END_ARG_INFO()
1212

1313
#define arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent_getPort arginfo_class_MongoDB_Driver_Monitoring_ServerHeartbeatFailedEvent_getDurationMicros

src/MongoDB/WriteConcern.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final public function getW(): string|int|null {}
3131
final public function getW() {}
3232
#endif
3333

34-
final public function getWtimeout(): ?int {}
34+
final public function getWtimeout(): int {}
3535

3636
final public function isDefault(): bool {}
3737

src/MongoDB/WriteConcern_arginfo.h

Lines changed: 2 additions & 2 deletions
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: ef3b593831b2de652f8bcac0a72eab5b75eeb073 */
2+
* Stub hash: b5c797e41b64764dc3b9392110c68a44bcd94932 */
33

44
#if PHP_VERSION_ID >= 80000
55
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_WriteConcern___construct, 0, 0, 1)
@@ -30,7 +30,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_WriteConcern_getW, 0, 0, 0)
3030
ZEND_END_ARG_INFO()
3131
#endif
3232

33-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_WriteConcern_getWtimeout, 0, 0, IS_LONG, 1)
33+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_WriteConcern_getWtimeout, 0, 0, IS_LONG, 0)
3434
ZEND_END_ARG_INFO()
3535

3636
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_WriteConcern_isDefault, 0, 0, _IS_BOOL, 0)

0 commit comments

Comments
 (0)