From 166542f981eb9e44131f644b3f895d496d4af711 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 21 Mar 2022 14:00:37 +0100 Subject: [PATCH] Fix param nullability --- phpstan/baseline.neon | 10 ++++++++++ src/Composer/Repository/PathRepository.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 3ac6db9da..bf18d6fff 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -4260,6 +4260,16 @@ parameters: count: 2 path: ../src/Composer/Repository/PathRepository.php + - + message: "#^Constructor of class Composer\\\\Repository\\\\PathRepository has an unused parameter \\$dispatcher\\.$#" + count: 1 + path: ../src/Composer/Repository/PathRepository.php + + - + message: "#^Constructor of class Composer\\\\Repository\\\\PathRepository has an unused parameter \\$httpDownloader\\.$#" + count: 1 + path: ../src/Composer/Repository/PathRepository.php + - message: "#^Only booleans are allowed in &&, string\\|false given on the right side\\.$#" count: 1 diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php index 859353450..7458ff519 100644 --- a/src/Composer/Repository/PathRepository.php +++ b/src/Composer/Repository/PathRepository.php @@ -111,7 +111,7 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn * @param IOInterface $io * @param Config $config */ - public function __construct(array $repoConfig, IOInterface $io, Config $config, HttpDownloader $httpDownloader, EventDispatcher $dispatcher = null, ProcessExecutor $process = null) + public function __construct(array $repoConfig, IOInterface $io, Config $config, HttpDownloader $httpDownloader = null, EventDispatcher $dispatcher = null, ProcessExecutor $process = null) { if (!isset($repoConfig['url'])) { throw new \RuntimeException('You must specify the `url` configuration for the path repository');