original_string: private function determineHeader(array $server): MapInterface
      {
          $header = new Map();
  
          foreach ($server as $name => $value) {
              if (strpos($name, 'HTTP_') === 0) {
                  $name = substr($name, 5);
                  $name = explode('_', $name);
                  $name = array_map('strtolower', $name);
                  $name = array_map('ucfirst', $name);
                  $name = implode('-', $name);
  
                  $header->set($name, $value);
              }
          }
  
          return new ReadOnlyMap($header);
      }
code: private function determineHeader(array $server): MapInterface
      {
          $header = new Map();
  
          foreach ($server as $name => $value) {
              if (strpos($name, 'HTTP_') === 0) {
                  $name = substr($name, 5);
                  $name = explode('_', $name);
                  $name = array_map('strtolower', $name);
                  $name = array_map('ucfirst', $name);
                  $name = implode('-', $name);
  
                  $header->set($name, $value);
              }
          }
  
          return new ReadOnlyMap($header);
      }
code_tokens: private function determineHeader ( array $ server ) : MapInterface { $ header = new Map ( ) ; foreach ( $ server as $ name => $ value ) { if ( strpos ( $ name , 'HTTP_' ) === 0 ) { $ name = substr ( $ name , 5 ) ; $ name = explode ( '_' , $ name ) ; $ name = array_map ( 'strtolower' , $ name ) ; $ name = array_map ( 'ucfirst' , $ name ) ; $ name = implode ( '-' , $ name ) ; $ header -> set ( $ name , $ value ) ; } } return new ReadOnlyMap ( $ header ) ; }
docstring: Determines the header by using passed server configuration.
  
  @param string[] $server
  The server configuration.
  @return MapInterface The determined header as a map.
docstring_tokens: Determines the header by using passed server configuration .