summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2019-11-16 18:40:06 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2019-11-18 12:44:38 +0100
commitc58b12334df9980b8832925c3920b992593eb09a (patch)
tree5fdd2cf1e7b767562d6502e86c272ce9d989b82b /ext/odbc
parent100552d4b5f648e0d6548c5e7393f8d7c10f0acb (diff)
downloadphp-git-c58b12334df9980b8832925c3920b992593eb09a.tar.gz
Add union return types with one class
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/odbc.stub.php7
-rw-r--r--ext/odbc/odbc_arginfo.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php
index fa7dedd665..9eafe46ae5 100644
--- a/ext/odbc/odbc.stub.php
+++ b/ext/odbc/odbc.stub.php
@@ -38,11 +38,8 @@ function odbc_exec($connection_id, string $query, int $flags = UNKNOWN) {}
function odbc_do($connection_id, string $query, int $flags = UNKNOWN) {}
#ifdef PHP_ODBC_HAVE_FETCH_HASH
-/**
- * @param resource $result
- * @return stdClass|false
- */
-function odbc_fetch_object($result, int $rownumber = -1) {}
+/** @param resource $result */
+function odbc_fetch_object($result, int $rownumber = -1): stdClass|false {}
/** @param resource $result */
function odbc_fetch_array($result, int $rownumber = -1): array|false {}
diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h
index 162d8cfdd1..41f00cb2a0 100644
--- a/ext/odbc/odbc_arginfo.h
+++ b/ext/odbc/odbc_arginfo.h
@@ -43,7 +43,7 @@ ZEND_END_ARG_INFO()
#define arginfo_odbc_do arginfo_odbc_exec
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_fetch_object, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE)
ZEND_ARG_INFO(0, result)
ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0)
ZEND_END_ARG_INFO()