Skip to content

Commit

Permalink
Fix error message formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crell committed Aug 25, 2024
1 parent 5ec780d commit 8aa76a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Formatter/ArrayBasedDeformatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function deserializeSequence(mixed $decoded, Field $field, Deserializer $
if ($class->assert($data)) {
return $data;
} else {
throw TypeMismatch::create($field->serializedName, "array($class->name)", "array(" . \get_debug_type($data[0] . ')'));
throw TypeMismatch::create($field->serializedName, "array($class->name)", "array(" . \get_debug_type($data[0]) . ')');
}
}
else if (class_exists($class) || interface_exists($class)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TomlFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function empty_values_validate(mixed $serialized): void
self::assertEquals('boop', $toTest['withDefault']);
self::assertArrayNotHasKey('nullableUninitialized', $toTest);
self::assertArrayNotHasKey('uninitialized', $toTest);
self::assertNull($toTest['roNullable']);
self::assertArrayNotHasKey('roNullable', $toTest);
}

protected function arrayify(mixed $serialized): array
Expand Down

0 comments on commit 8aa76a3

Please sign in to comment.