code: protected function normalizeConfig(array $config): array
      {
          $defaultConfig = [
              'dir' => getcwd(),
              'ext' => '.dat',
              'gzip' => false,
              'cache' => true,
              'formatter' => null,
              'swap_memory_limit' => 2097152, // 2MB
          ];
  
          return array_replace($defaultConfig, $config);
      }
docs: Normalize the user supplied config.
  
  @param array $config
  
  @return array