From cedd4476597ede8430fb9fb50cfa29e63351cb86 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 27 Dec 2022 19:52:14 +0100 Subject: [PATCH] [ticket/16955] Resolve incompatibilities with doctum PHPBB3-16955 --- phpBB/phpbb/db/doctrine/table_helper.php | 3 ++- phpBB/phpbb/db/doctrine/type_converter.php | 3 ++- phpBB/phpbb/db/driver/driver.php | 3 ++- phpBB/phpbb/db/migrator.php | 3 ++- phpBB/phpbb/event/md_exporter.php | 3 ++- phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/phpBB/phpbb/db/doctrine/table_helper.php b/phpBB/phpbb/db/doctrine/table_helper.php index b14571c9f8..935db35838 100644 --- a/phpBB/phpbb/db/doctrine/table_helper.php +++ b/phpBB/phpbb/db/doctrine/table_helper.php @@ -21,7 +21,8 @@ class table_helper * * @param array $column_data Column data. * - * @return array{string, array} A pair of type and array of column options. + * @return array A pair of type and array of column options. + * @psalm-return array{string, array} */ public static function convert_column_data(array $column_data, string $dbms_layer): array { diff --git a/phpBB/phpbb/db/doctrine/type_converter.php b/phpBB/phpbb/db/doctrine/type_converter.php index 61da22eaf1..1de09e821c 100644 --- a/phpBB/phpbb/db/doctrine/type_converter.php +++ b/phpBB/phpbb/db/doctrine/type_converter.php @@ -54,7 +54,8 @@ class type_converter * * @param string $type Legacy type name * - * @return array{string, array} Pair of type name and options. + * @return array Pair of type name and options. + * @psalm-return array{string, array} */ public static function convert(string $type, string $dbms): array { diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index da4cc80459..b4220d6e6a 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -1102,7 +1102,8 @@ abstract class driver implements driver_interface /** * Return sql error array * - * @return array{message: string, code: int|string} SQL error array with message and error code + * @return array SQL error array with message and error code + * @psalm-return array{message: string, code: int|string} */ abstract protected function _sql_error(): array; diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index bdb85a7996..681dfbd735 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -651,7 +651,8 @@ class migrator * @param array $steps The steps to run * @param bool|string $state Current state of the migration * @param bool $revert true to revert a data step - * @return bool|array{result: mixed, step: int} migration state. True if completed, serialized array if not finished + * @return bool|array migration state. True if completed, serialized array if not finished + * @psalm-return bool|array{result: mixed, step: int} * @throws \phpbb\db\migration\exception */ protected function process_data_step($steps, $state, $revert = false) diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php index 5d2155369a..84e04133de 100644 --- a/phpBB/phpbb/event/md_exporter.php +++ b/phpBB/phpbb/event/md_exporter.php @@ -461,7 +461,8 @@ class md_exporter * Validate "Changed" Information * * @param string $changed - * @return array{string, string} Changed information containing version and description in respective order + * @return array Changed information containing version and description in respective order + * @psalm-return array{string, string} * @throws \LogicException */ public function validate_changed($changed) diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php index 06695f5057..b150d7098e 100644 --- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php @@ -82,7 +82,8 @@ class ajax_iohandler extends iohandler_base protected $redirect_url; /** - * @var resource|closed-resource + * @var resource + * @psalm-var resource|closed-resource */ protected $file_lock_pointer;