src/Mapper/Environment.php
public function map($resource, array $data): ResourceClass
    {
        /** @var ResourceClass $environment */
        $environment = $this->hydrator->hydrate($resource ?: ResourceClass::class, [
            'sys' => $this->createSystemProperties(SystemProperties::class, $data),
            'locales' => \array_map(function (array $localeData): Locale {
                /** @var Locale $locale */
                $locale = $this->builder->build($localeData);

                return $locale;
            }, $data['locales']),
        ]);

        return $environment;
    }
public function map($resource, array $data): ResourceClass
    {
        /** @var ResourceClass $environment */
        $environment = $this->hydrator->hydrate($resource ?: ResourceClass::class, [
            'sys' => $this->createSystemProperties(SystemProperties::class, $data),
            'locales' => \array_map(function (array $localeData): Locale {
                /** @var Locale $locale */
                $locale = $this->builder->build($localeData);

                return $locale;
            }, $data['locales']),
        ]);

        return $environment;
    }
{@inheritdoc}