original_string: protected function addValue(&$fieldsArray, $name, $value)
      {
          $arrayCheck = substr($name, -2);
  
          if ($arrayCheck == '[]') {
              $nameSubstr = substr($name, 0, -2);
              if (!isset($fieldsArray[$nameSubstr]))
                  $fieldsArray[$nameSubstr] = [];
  
              $fieldsArray[$nameSubstr][] = $value;
          } else {
              $fieldsArray[$name] = $value;
          }
      }
code: protected function addValue(&$fieldsArray, $name, $value)
      {
          $arrayCheck = substr($name, -2);
  
          if ($arrayCheck == '[]') {
              $nameSubstr = substr($name, 0, -2);
              if (!isset($fieldsArray[$nameSubstr]))
                  $fieldsArray[$nameSubstr] = [];
  
              $fieldsArray[$nameSubstr][] = $value;
          } else {
              $fieldsArray[$name] = $value;
          }
      }
code_tokens: protected function addValue ( & $ fieldsArray , $ name , $ value ) { $ arrayCheck = substr ( $ name , - 2 ) ; if ( $ arrayCheck == '[]' ) { $ nameSubstr = substr ( $ name , 0 , - 2 ) ; if ( ! isset ( $ fieldsArray [ $ nameSubstr ] ) ) $ fieldsArray [ $ nameSubstr ] = [ ] ; $ fieldsArray [ $ nameSubstr ] [ ] = $ value ; } else { $ fieldsArray [ $ name ] = $ value ; } }
docstring: Inserts the value into the passed array.
  Used to parse input array from HTTP request body, if needed
  
  @param array $fieldsArray
  @param string $name name of the field
  @param string $value value of the field
docstring_tokens: Inserts the value into the passed array . Used to parse input array from HTTP request body if needed