src/Definition/Type/MapType.php
public function normalize($data)
    {
        if (!$data instanceof MapInterface) {
            throw new NormalizationException(
                'The value must be an instance of Innmind\Immutable\MapInterface'
            );
        }

        return $data->reduce(
            [],
            function(array $values, $key, $value): array {
                $key = $this->key->normalize($key);
                $values[$key] = $this->value->normalize($value);

                return $values;
            }
        );
    }
public function normalize($data)
    {
        if (!$data instanceof MapInterface) {
            throw new NormalizationException(
                'The value must be an instance of Innmind\Immutable\MapInterface'
            );
        }

        return $data->reduce(
            [],
            function(array $values, $key, $value): array {
                $key = $this->key->normalize($key);
                $values[$key] = $this->value->normalize($value);

                return $values;
            }
        );
    }
{@inheritdoc}