We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 563fd2f + 2287198 commit 3343fd3Copy full SHA for 3343fd3
tests/IsOneOfAssert.php
@@ -24,11 +24,12 @@ public function __construct(private array $allowedValues)
24
*/
25
public function toString(): string
26
{
27
- $allowedValues = [];
28
-
29
- foreach ($this->allowedValues as $value) {
30
- $this->allowedValues[] = VarDumper::create($value)->asString();
31
- }
+ $allowedValues = array_map(
+ static function ($value): string {
+ return VarDumper::dumpAsString($value);
+ },
+ $this->allowedValues,
32
+ );
33
34
$expectedAsString = implode(', ', $allowedValues);
35
0 commit comments