original_string: protected function importResource(BaseConfig $baseConfig)
      {
          foreach ($baseConfig as $key => $value) {
              if ($value instanceof BaseConfig) {
                  $this->importResource($value);
              } elseif (is_string($value)) {
                  if ($key === self::RESOURCES_KEY) {
                      $resources = $this->clear(
                          $baseConfig,
                          $this->create($value)
                      );
                      $baseConfig->merge($resources);
                      $baseConfig->offsetUnset($key);
  
                  } elseif (substr_count($value, self::RESOURCES_VALUE)) {
                      $baseConfig[$key] = $this->create(
                          substr($value, strlen(self::RESOURCES_VALUE))
                      );
  
                  } elseif ($key === self::MODULE_KEY) {
                      $resources = $this->clear(
                          $baseConfig,
                          $this->moduleConfigCreate($value)
                      );
  
                      $baseConfig->merge($resources);
                      $baseConfig->offsetUnset($key);
  
                  } elseif (substr_count($value, self::MODULE_VALUE)) {
                      $baseConfig[$key] =
                          $this->moduleConfigCreate(
                              substr(
                                  $value,
                                  strlen(self::MODULE_VALUE)
                              )
                          );
  
                  }
  
                  if (substr_count($value, self::ENVIRONMENT)) {
                      $baseConfig[$key] = str_replace(
                          self::ENVIRONMENT,
                          $this->environment,
                          $value
                      );
                  }
              }
          }
      }
code: protected function importResource(BaseConfig $baseConfig)
      {
          foreach ($baseConfig as $key => $value) {
              if ($value instanceof BaseConfig) {
                  $this->importResource($value);
              } elseif (is_string($value)) {
                  if ($key === self::RESOURCES_KEY) {
                      $resources = $this->clear(
                          $baseConfig,
                          $this->create($value)
                      );
                      $baseConfig->merge($resources);
                      $baseConfig->offsetUnset($key);
  
                  } elseif (substr_count($value, self::RESOURCES_VALUE)) {
                      $baseConfig[$key] = $this->create(
                          substr($value, strlen(self::RESOURCES_VALUE))
                      );
  
                  } elseif ($key === self::MODULE_KEY) {
                      $resources = $this->clear(
                          $baseConfig,
                          $this->moduleConfigCreate($value)
                      );
  
                      $baseConfig->merge($resources);
                      $baseConfig->offsetUnset($key);
  
                  } elseif (substr_count($value, self::MODULE_VALUE)) {
                      $baseConfig[$key] =
                          $this->moduleConfigCreate(
                              substr(
                                  $value,
                                  strlen(self::MODULE_VALUE)
                              )
                          );
  
                  }
  
                  if (substr_count($value, self::ENVIRONMENT)) {
                      $baseConfig[$key] = str_replace(
                          self::ENVIRONMENT,
                          $this->environment,
                          $value
                      );
                  }
              }
          }
      }
code_tokens: protected function importResource ( BaseConfig $ baseConfig ) { foreach ( $ baseConfig as $ key => $ value ) { if ( $ value instanceof BaseConfig ) { $ this -> importResource ( $ value ) ; } elseif ( is_string ( $ value ) ) { if ( $ key === self :: RESOURCES_KEY ) { $ resources = $ this -> clear ( $ baseConfig , $ this -> create ( $ value ) ) ; $ baseConfig -> merge ( $ resources ) ; $ baseConfig -> offsetUnset ( $ key ) ; } elseif ( substr_count ( $ value , self :: RESOURCES_VALUE ) ) { $ baseConfig [ $ key ] = $ this -> create ( substr ( $ value , strlen ( self :: RESOURCES_VALUE ) ) ) ; } elseif ( $ key === self :: MODULE_KEY ) { $ resources = $ this -> clear ( $ baseConfig , $ this -> moduleConfigCreate ( $ value ) ) ; $ baseConfig -> merge ( $ resources ) ; $ baseConfig -> offsetUnset ( $ key ) ; } elseif ( substr_count ( $ value , self :: MODULE_VALUE ) ) { $ baseConfig [ $ key ] = $ this -> moduleConfigCreate ( substr ( $ value , strlen ( self :: MODULE_VALUE ) ) ) ; } if ( substr_count ( $ value , self :: ENVIRONMENT ) ) { $ baseConfig [ $ key ] = str_replace ( self :: ENVIRONMENT , $ this -> environment , $ value ) ; } } } }
docstring: Import encountered files in the configuration
  
  @param Config $baseConfig
  @throws AdapterNotFoundException
  @throws ConstantDirNotFoundException
  @throws ExtensionNotFoundException
docstring_tokens: Import encountered files in the configuration