From fa522d24606c8a9ceda6e41f641f117fb5b3e572 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 20 Aug 2023 09:49:54 +0200 Subject: [PATCH] [ticket/17176] Add more test stubs for psalm PHPBB3-17176 --- build/psalm/stubs/gd.php | 15 +++++++++++++++ build/psalm/stubs/ldap.php | 16 ++++++++++++++++ build/psalm/stubs/sqlsrv.php | 17 +++++++++++++++++ psalm.xml | 4 +++- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 build/psalm/stubs/gd.php create mode 100644 build/psalm/stubs/ldap.php create mode 100644 build/psalm/stubs/sqlsrv.php diff --git a/build/psalm/stubs/gd.php b/build/psalm/stubs/gd.php new file mode 100644 index 0000000000..2b5b5a2bf7 --- /dev/null +++ b/build/psalm/stubs/gd.php @@ -0,0 +1,15 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +/** @link https://www.php.net/manual/en/image.constants.php */ +define('IMG_COLOR_STYLED', -2); diff --git a/build/psalm/stubs/ldap.php b/build/psalm/stubs/ldap.php new file mode 100644 index 0000000000..44ed90fdb9 --- /dev/null +++ b/build/psalm/stubs/ldap.php @@ -0,0 +1,16 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +/** @link https://www.php.net/manual/en/ldap.constants.php */ +define('LDAP_OPT_PROTOCOL_VERSION', 17); +define('LDAP_OPT_REFERRALS', 8); diff --git a/build/psalm/stubs/sqlsrv.php b/build/psalm/stubs/sqlsrv.php new file mode 100644 index 0000000000..8e2aaf7426 --- /dev/null +++ b/build/psalm/stubs/sqlsrv.php @@ -0,0 +1,17 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +/** @link https://www.php.net/manual/en/sqlsrv.constants.php */ +define('SQLSRV_ERR_ERRORS', 0); +define('SQLSRV_FETCH_ASSOC', 2); +define('SQLSRV_CURSOR_STATIC', 'static'); diff --git a/psalm.xml b/psalm.xml index ddfeb6e78f..06a84e253b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -2,7 +2,6 @@ + + +