From b82235480ed01dc4c60f1b5ca4adc008ca6c30f5 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 12 Jan 2025 09:10:21 +0100 Subject: [PATCH] AssertContainsOnly::assertContainsNotOnlyInstancesOf(): fix incorrect param name This could be problematic when tests use function calls with named parameters, so let's make sure the parameter name matches the one used in PHPUnit. --- src/Polyfills/AssertContainsOnly.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Polyfills/AssertContainsOnly.php b/src/Polyfills/AssertContainsOnly.php index a05a1c4..308dfe1 100644 --- a/src/Polyfills/AssertContainsOnly.php +++ b/src/Polyfills/AssertContainsOnly.php @@ -31,14 +31,14 @@ trait AssertContainsOnly { /** * Asserts that $haystack does not only contain instances of class or interface $type. * - * @param string $type Class or interface name. - * @param iterable $haystack The variable to test. - * @param string $message Optional failure message to display. + * @param string $className Class or interface name. + * @param iterable $haystack The variable to test. + * @param string $message Optional failure message to display. * * @return void */ - final public static function assertContainsNotOnlyInstancesOf( string $type, $haystack, string $message = '' ) { - static::assertNotContainsOnly( $type, $haystack, false, $message ); + final public static function assertContainsNotOnlyInstancesOf( string $className, $haystack, string $message = '' ) { + static::assertNotContainsOnly( $className, $haystack, false, $message ); } /**