original_string: protected function getOptionalParams($type, array $optionalParams)
      {
          foreach ($optionalParams as $optionalParamName) {
              $val = $this->getConfigValue($type, $optionalParamName);
  
              if ($val) {
                  $this->serviceParams[$optionalParamName] = $val;
              }
  
              $this->optionalParamNames = $optionalParamName;
          }
      }
code: protected function getOptionalParams($type, array $optionalParams)
      {
          foreach ($optionalParams as $optionalParamName) {
              $val = $this->getConfigValue($type, $optionalParamName);
  
              if ($val) {
                  $this->serviceParams[$optionalParamName] = $val;
              }
  
              $this->optionalParamNames = $optionalParamName;
          }
      }
code_tokens: protected function getOptionalParams ( $ type , array $ optionalParams ) { foreach ( $ optionalParams as $ optionalParamName ) { $ val = $ this -> getConfigValue ( $ type , $ optionalParamName ) ; if ( $ val ) { $ this -> serviceParams [ $ optionalParamName ] = $ val ; } $ this -> optionalParamNames = $ optionalParamName ; } }
docstring: get optional param values from Config and add them to the service params
  
  @param $type
  @param array $optionalParams
docstring_tokens: get optional param values from Config and add them to the service params