doc: remove duplicated section

This commit is contained in:
Romain Canon 2022-05-27 16:01:50 +02:00
parent b794c692c4
commit 7044801119

View File

@ -707,36 +707,6 @@ final class SecondImplementation implements SomeInterface
}
```
### Modifiers
Sometimes the source is not in the same format and/or organised in the same
way as a value object. Modifiers can be used to change a source before the
mapping occurs.
#### Camel case keys
This modifier recursively forces all keys to be in camelCase format.
```php
final class SomeClass
{
public readonly string $someValue;
}
$source = new \CuyZ\Valinor\Mapper\Source\Modifier\CamelCaseKeys([
'some_value' => 'foo',
// …or…
'some-value' => 'foo',
// …or…
'some value' => 'foo',
// …will be replaced by `['someValue' => 'foo']`
]);
(new \CuyZ\Valinor\MapperBuilder())
->mapper()
->map(SomeClass::class, $source);
```
## Handled types
To prevent conflicts or duplication of the type annotations, this library tries