original_string: private function narrowArray(array $array, string $key = null)
      {
          if ($key) {
              $key .= '--';
          }
  
          $result = [];
  
          foreach ($array as $index => $value) {
              if (is_array($value)) {
                  $result = array_merge($result, $this->narrowArray($value, $key . $index));
              } else {
                  $result[$key . $index] = $value;
              }
          }
  
          return $result;
      }
code: private function narrowArray(array $array, string $key = null)
      {
          if ($key) {
              $key .= '--';
          }
  
          $result = [];
  
          foreach ($array as $index => $value) {
              if (is_array($value)) {
                  $result = array_merge($result, $this->narrowArray($value, $key . $index));
              } else {
                  $result[$key . $index] = $value;
              }
          }
  
          return $result;
      }
code_tokens: private function narrowArray ( array $ array , string $ key = null ) { if ( $ key ) { $ key .= '--' ; } $ result = [ ] ; foreach ( $ array as $ index => $ value ) { if ( is_array ( $ value ) ) { $ result = array_merge ( $ result , $ this -> narrowArray ( $ value , $ key . $ index ) ) ; } else { $ result [ $ key . $ index ] = $ value ; } } return $ result ; }
docstring: Narrows PHP's native nested map into a non-nested map.
  
  @param mixed[] $array
  The nested map to narrow.
  @param string|null $key
  The parent key.
  @return string[] Narrowed map.
docstring_tokens: Narrows PHP s native nested map into a non - nested map .