mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 06:51:33 +02:00
[ticket/17281] Update psalm config and fix issues
PHPBB3-17281
This commit is contained in:
@@ -341,11 +341,11 @@ class installer
|
||||
/**
|
||||
* Recover install progress
|
||||
*
|
||||
* @return string Index of the next installer module to execute
|
||||
* @return int Index of the next installer module to execute
|
||||
*/
|
||||
protected function recover_progress()
|
||||
protected function recover_progress(): int
|
||||
{
|
||||
$progress_array = $this->install_config->get_progress_data();
|
||||
return $progress_array['last_task_module_index'];
|
||||
return (int) $progress_array['last_task_module_index'];
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ class installer_configuration implements ConfigurationInterface
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('installer');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
/** @psalm-suppress UndefinedMethod */
|
||||
$rootNode
|
||||
->children()
|
||||
->arrayNode('admin')
|
||||
|
@@ -149,7 +149,7 @@ class create_schema_file extends \phpbb\install\task_base
|
||||
$tables = [];
|
||||
foreach ($tables_data['parameters'] as $parameter => $table)
|
||||
{
|
||||
$tables[str_replace('tables.', '', $parameter)] = str_replace('%core.table_prefix%', $table_prefix, $table);
|
||||
$tables[str_replace('tables.', '', (string) $parameter)] = str_replace('%core.table_prefix%', $table_prefix, $table);
|
||||
}
|
||||
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator(
|
||||
|
@@ -186,12 +186,12 @@ abstract class module_base implements module_interface
|
||||
/**
|
||||
* Returns the next task's name
|
||||
*
|
||||
* @return string Index of the array element of the next task
|
||||
* @return int Index of the array element of the next task
|
||||
*/
|
||||
protected function recover_progress()
|
||||
protected function recover_progress(): int
|
||||
{
|
||||
$progress_array = $this->install_config->get_progress_data();
|
||||
return $progress_array['last_task_index'];
|
||||
return (int) $progress_array['last_task_index'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -28,6 +28,7 @@ class updater_configuration implements ConfigurationInterface
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('updater');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
/** @psalm-suppress UndefinedMethod */
|
||||
$rootNode
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
|
Reference in New Issue
Block a user