<commit_before># AdvancedDenormalizationObjectMapping

## Mapping

### ModelMapping

```php
<?php

namespace MyProject\Mapping;

use Chubbyphp\Deserialization\Accessor\PropertyAccessor;
use Chubbyphp\Deserialization\Denormalizer\Relation\EmbedManyFieldDenormalizer;
use Chubbyphp\Deserialization\Denormalizer\Relation\EmbedOneFieldDenormalizer;
use Chubbyphp\Deserialization\DeserializerRuntimeException;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingBuilder;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingInterface;
use Chubbyphp\Deserialization\Mapping\DenormalizationObjectMappingInterface;
use MyProject\Model\AbstractManyModel;
use MyProject\Model\Model;

final class ModelMapping implements DenormalizationObjectMappingInterface
{
    /**
     * @return string
     */
    public function getClass(): string
    {
        return Model::class;
    }

    /**
     * @param string      $path
     * @param string|null $type
     *
     * @return callable
     *
     * @throws DeserializerRuntimeException
     */
    public function getDenormalizationFactory(string $path, string $type = null): callable
    {
        return function () {
            return new Model();
        };
    }

    /**
     * @param string      $path
     * @param string|null $type
     *
     * @return DenormalizationFieldMappingInterface[]
     *
     * @throws DeserializerRuntimeException
     */
    public function getDenormalizationFieldMappings(string $path, string $type = null): array
    {
        return [
            DenormalizationFieldMappingBuilder::create('name')->getMapping(),
            DenormalizationFieldMappingBuilder::create('one')->setFieldDenormalizer(
                new EmbedOneFieldDenormalizer(OneModel::class, new PropertyAccessor('one'))
            )->getMapping(),
            DenormalizationFieldMappingBuilder::create('manies')->setFieldDenormalizer(
                new EmbedManyFieldDenormalizer(AbstractManyModel::class, new PropertyAccessor('manies'))
            )->getMapping(),
        ];
    }
}
```

### BaseManyModelMapping

```php
<?php

namespace MyProject\Mapping;

use Chubbyphp\Deserialization\DeserializerRuntimeException;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingInterface;
use Chubbyphp\Deserialization\Mapping\DenormalizationObjectMappingInterface;
use MyProject\Model\AbstractManyModel;

final class BaseManyModelMapping implements DenormalizationObjectMappingInterface
{
    /**
     * @var ManyModelMapping
     */
    private $modelMapping;

    /**
     * @var array
     */
    private $supportedTypes;

    /**
     * @param ManyModelMapping $modelMapping
     * @param array             $supportedTypes<commit_msg>cs fix in doc<commit_after># AdvancedDenormalizationObjectMapping

## Mapping

### ModelMapping

```php
<?php

namespace MyProject\Mapping;

use Chubbyphp\Deserialization\Accessor\PropertyAccessor;
use Chubbyphp\Deserialization\Denormalizer\Relation\EmbedManyFieldDenormalizer;
use Chubbyphp\Deserialization\Denormalizer\Relation\EmbedOneFieldDenormalizer;
use Chubbyphp\Deserialization\DeserializerRuntimeException;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingBuilder;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingInterface;
use Chubbyphp\Deserialization\Mapping\DenormalizationObjectMappingInterface;
use MyProject\Model\AbstractManyModel;
use MyProject\Model\Model;

final class ModelMapping implements DenormalizationObjectMappingInterface
{
    /**
     * @return string
     */
    public function getClass(): string
    {
        return Model::class;
    }

    /**
     * @param string      $path
     * @param string|null $type
     *
     * @return callable
     *
     * @throws DeserializerRuntimeException
     */
    public function getDenormalizationFactory(string $path, string $type = null): callable
    {
        return function () {
            return new Model();
        };
    }

    /**
     * @param string      $path
     * @param string|null $type
     *
     * @return DenormalizationFieldMappingInterface[]
     *
     * @throws DeserializerRuntimeException
     */
    public function getDenormalizationFieldMappings(string $path, string $type = null): array
    {
        return [
            DenormalizationFieldMappingBuilder::create('name')->getMapping(),
            DenormalizationFieldMappingBuilder::create('one')->setFieldDenormalizer(
                new EmbedOneFieldDenormalizer(OneModel::class, new PropertyAccessor('one'))
            )->getMapping(),
            DenormalizationFieldMappingBuilder::create('manies')->setFieldDenormalizer(
                new EmbedManyFieldDenormalizer(AbstractManyModel::class, new PropertyAccessor('manies'))
            )->getMapping(),
        ];
    }
}
```

### BaseManyModelMapping

```php
<?php

namespace MyProject\Mapping;

use Chubbyphp\Deserialization\DeserializerRuntimeException;
use Chubbyphp\Deserialization\Mapping\DenormalizationFieldMappingInterface;
use Chubbyphp\Deserialization\Mapping\DenormalizationObjectMappingInterface;
use MyProject\Model\AbstractManyModel;

final class BaseManyModelMapping implements DenormalizationObjectMappingInterface
{
    /**
     * @var ManyModelMapping
     */
    private $modelMapping;

    /**
     * @var array
     */
    private $supportedTypes;

    /**
     * @param ManyModelMapping $modelMapping
     * @param array            $supportedTypes
{'fraction_non_alphanumeric': 0.09132587566477168, 'fraction_numerical': 0.0, 'mean_word_length': 3.6417021276595745, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4147733', 'n_tokens_mistral': 1472, 'n_tokens_neox': 1445, 'n_words': 254}