[ticket/17176] Add more test stubs for psalm

PHPBB3-17176
This commit is contained in:
Marc Alexander 2023-08-20 09:49:54 +02:00
parent 89ad5fbd27
commit fa522d2460
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
4 changed files with 51 additions and 1 deletions

15
build/psalm/stubs/gd.php Normal file
View file

@ -0,0 +1,15 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @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);

View file

@ -0,0 +1,16 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @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);

View file

@ -0,0 +1,17 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @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');

View file

@ -2,7 +2,6 @@
<psalm <psalm
errorLevel="5" errorLevel="5"
phpVersion="8.1" phpVersion="8.1"
resolveFromConfigFile="true"
autoloader="build/psalm_bootstrap.php" autoloader="build/psalm_bootstrap.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config" xmlns="https://getpsalm.org/schema/config"
@ -23,10 +22,13 @@
<stubs> <stubs>
<file name="build/psalm/stubs/apcu/apcu.php"/> <file name="build/psalm/stubs/apcu/apcu.php"/>
<file name="build/psalm/stubs/gd.php"/>
<file name="build/psalm/stubs/ldap.php"/>
<file name="build/psalm/stubs/memcached/memcached.php"/> <file name="build/psalm/stubs/memcached/memcached.php"/>
<file name="build/psalm/stubs/oci8/oci8.php"/> <file name="build/psalm/stubs/oci8/oci8.php"/>
<file name="build/psalm/stubs/pgsql/pgsql.php"/> <file name="build/psalm/stubs/pgsql/pgsql.php"/>
<file name="build/psalm/stubs/redis/redis.php"/> <file name="build/psalm/stubs/redis/redis.php"/>
<file name="build/psalm/stubs/sqlite3/sqlite3.php"/> <file name="build/psalm/stubs/sqlite3/sqlite3.php"/>
<file name="build/psalm/stubs/sqlsrv.php"/>
</stubs> </stubs>
</psalm> </psalm>