Skip to content

Commit fa1f86f

Browse files
author
Côme Chilliet
committed
Explicitely mark nullable strings
1 parent a835eee commit fa1f86f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

ext/ldap/ldap.stub.php

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

55
#ifdef HAVE_ORALDAP
66
/** @return resource|false */
7-
function ldap_connect(string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {}
7+
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {}
88
#else
99
/** @return resource|false */
10-
function ldap_connect(string $uri = null, int $port = 389) {}
10+
function ldap_connect(?string $uri = null, int $port = 389) {}
1111
#endif
1212

1313
/** @param resource $link */
@@ -20,17 +20,17 @@ function ldap_unbind($link): bool {}
2020
function ldap_close($link): bool {}
2121

2222
/** @param resource $link */
23-
function ldap_bind($link, string $dn = null, string $password = null): bool {}
23+
function ldap_bind($link, ?string $dn = null, ?string $password = null): bool {}
2424

2525
/**
2626
* @param resource $link
2727
* @return resource|false
2828
*/
29-
function ldap_bind_ext($link, string $dn = null, string $password = null, array $controls = []) {}
29+
function ldap_bind_ext($link, ?string $dn = null, ?string $password = null, array $controls = []) {}
3030

3131
#ifdef HAVE_LDAP_SASL
3232
/** @param resource $link */
33-
function ldap_sasl_bind($link, string $dn = null, string $password = null, string $mech = null, string $realm = null, string $authc_id = null, string $authz_id = null, string $props = null): bool {}
33+
function ldap_sasl_bind($link, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {}
3434
#endif
3535

3636
/**

ext/ldap/ldap_arginfo.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: daec139fe03acf248017060876e80bf7cab89e3a */
2+
* Stub hash: 739893b4bf6f34da80b7c7b10a670c16d4239bdb */
33

44
#if defined(HAVE_ORALDAP)
55
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
6-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null")
6+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
77
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
88
ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0)
99
ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0)
@@ -13,7 +13,7 @@ ZEND_END_ARG_INFO()
1313

1414
#if !(defined(HAVE_ORALDAP))
1515
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
16-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null")
16+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
1717
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
1818
ZEND_END_ARG_INFO()
1919
#endif
@@ -26,27 +26,27 @@ ZEND_END_ARG_INFO()
2626

2727
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0)
2828
ZEND_ARG_INFO(0, link)
29-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null")
30-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null")
29+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
30+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
3131
ZEND_END_ARG_INFO()
3232

3333
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1)
3434
ZEND_ARG_INFO(0, link)
35-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null")
36-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null")
35+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
36+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
3737
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
3838
ZEND_END_ARG_INFO()
3939

4040
#if defined(HAVE_LDAP_SASL)
4141
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0)
4242
ZEND_ARG_INFO(0, link)
43-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null")
44-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null")
45-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 0, "null")
46-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 0, "null")
47-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 0, "null")
48-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 0, "null")
49-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "null")
43+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
44+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
45+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 1, "null")
46+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 1, "null")
47+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 1, "null")
48+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 1, "null")
49+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 1, "null")
5050
ZEND_END_ARG_INFO()
5151
#endif
5252

0 commit comments

Comments
 (0)