code: 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;
      }
docs: {@inheritdoc}