[ticket/16955] Resolve psalm issues in di files

PHPBB3-16955
This commit is contained in:
Marc Alexander 2022-12-26 14:07:53 +01:00
parent cd026245fe
commit c4d3e1aa7b
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
4 changed files with 11 additions and 6 deletions

View file

@ -45,3 +45,7 @@ require_once $phpbb_root_path . 'includes/compatibility_globals.' . $phpEx;
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', $phpbb_root_path . 'phpbb/', "php");
$phpbb_class_loader->register();
class phpbb_cache_container extends \Symfony\Component\DependencyInjection\Container
{
}

View file

@ -46,7 +46,7 @@ class container_builder
/**
* The container under construction
*
* @var ContainerBuilder
* @var \phpbb_cache_container|ContainerBuilder
*/
protected $container;
@ -449,6 +449,7 @@ class container_builder
$ext_container->register('cache.driver', '\\phpbb\\cache\\driver\\dummy');
$ext_container->compile();
/** @var \phpbb\config\config $config */
$config = $ext_container->get('config');
if (@is_file($this->phpbb_root_path . $config['exts_composer_vendor_dir'] . '/autoload.php'))
{

View file

@ -32,12 +32,12 @@ class config extends Extension
/**
* Loads a specific configuration.
*
* @param array $config An array of configuration values
* @param array $configs An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
* @throws \InvalidArgumentException When provided tag is not defined in this extension
*/
public function load(array $config, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container)
{
$parameters = array(
'core.adm_relative_path' => $this->config_php->get('phpbb_adm_relative_path') ? $this->config_php->get('phpbb_adm_relative_path') : 'adm/',

View file

@ -85,13 +85,13 @@ class ordered_service_collection extends service_collection
/**
* Adds a service ID to the collection
*
* @param string $service_id
* @param string $name
* @param int $order
*/
public function add($service_id, $order = 0)
public function add($name, $order = 0)
{
$order = (int) $order;
$this->service_ids[$order][] = $service_id;
$this->service_ids[$order][] = $name;
$this->is_ordered = false;
}