Skip to content

Commit 86240d7

Browse files
jmikolaalcaeus
andauthored
Apply suggestions from code review
Co-authored-by: Andreas Braun <[email protected]>
1 parent 6a28a27 commit 86240d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Exception/InvalidArgumentException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class InvalidArgumentException extends DriverInvalidArgumentException implements
3434
*
3535
* @param string $name Name of the argument or option
3636
* @param mixed $value Actual value (used to derive the type)
37-
* @param string|string[] $expectedType Expected type as a string or an array containing one or more strings
37+
* @param string|list<string> $expectedType Expected type as a string or an array containing one or more strings
3838
* @return self
3939
*/
4040
public static function invalidType(string $name, $value, $expectedType)
@@ -46,6 +46,7 @@ public static function invalidType(string $name, $value, $expectedType)
4646
return new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, get_debug_type($value)));
4747
}
4848

49+
/** @param list<string> $types */
4950
private static function expectedTypesToString(array $types): string
5051
{
5152
assert(count($types) > 0);

0 commit comments

Comments
 (0)