From 8b580e5b78807eb0d648b9100d28e96a4604484f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:51:49 +0100 Subject: [PATCH] qa: rename assertion method and its argument to reflect actual assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- test/Service/ConfigProviderIntegrationTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Service/ConfigProviderIntegrationTest.php b/test/Service/ConfigProviderIntegrationTest.php index 3ea15227..518a04c0 100644 --- a/test/Service/ConfigProviderIntegrationTest.php +++ b/test/Service/ConfigProviderIntegrationTest.php @@ -50,13 +50,13 @@ public function servicesProvidedByConfigProvider(): Generator $dependencies = $provider->getDependencyConfig(); $factories = $dependencies['factories'] ?? []; - self::assertMappedWithStrings($factories); + self::assertArrayIsMappedWithStrings($factories); $invokables = $dependencies['invokables'] ?? []; - self::assertMappedWithStrings($invokables); + self::assertArrayIsMappedWithStrings($invokables); $services = $dependencies['services'] ?? []; - self::assertMappedWithStrings($services); + self::assertArrayIsMappedWithStrings($services); $aliases = $dependencies['aliases'] ?? []; - self::assertMappedWithStrings($aliases); + self::assertArrayIsMappedWithStrings($aliases); $serviceNames = array_unique( array_merge( @@ -73,15 +73,15 @@ public function servicesProvidedByConfigProvider(): Generator } /** - * @psalm-assert array $iterable + * @psalm-assert array $array */ - private static function assertMappedWithStrings(mixed $iterable): void + private static function assertArrayIsMappedWithStrings(mixed $array): void { - if (! is_array($iterable)) { + if (! is_array($array)) { throw new InvalidArgumentException('Expecting value to be an array.'); } - foreach (array_keys($iterable) as $value) { + foreach (array_keys($array) as $value) { if (is_string($value)) { continue; }