Skip to content

Commit 7e7feea

Browse files
authored
Address Caster should return Address object not DateTimeInterface
1 parent e9e907b commit 7e7feea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Web/Documentation/content/1.x/2-features/01-mapper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ use Tempest\Mapper\Caster;
173173

174174
final readonly class AddressCaster implements Caster
175175
{
176-
public function cast(mixed $input): DateTimeInterface
176+
public function cast(mixed $input): Address
177177
{
178178
return new Address(
179179
street: $input['street'],
@@ -235,4 +235,4 @@ $container->get(SerializerFactory::class)
235235
->addSerializer(Address::class, AddressSerializer::class);
236236
```
237237

238-
If you're looking for the right place where to put this logic, [provider classes](/docs/extra-topics/package-development#provider-classes) is our recommendation.
238+
If you're looking for the right place where to put this logic, [provider classes](/docs/extra-topics/package-development#provider-classes) is our recommendation.

0 commit comments

Comments
 (0)