original_string: private function _addAttributeToArray(array &$attributeArray, $name, $value)
      {
          // If multiple attributes exist, add as an array value
          if (isset($attributeArray[$name])) {
              // Initialize the array with the existing value
              if (!is_array($attributeArray[$name])) {
                  $existingValue = $attributeArray[$name];
                  $attributeArray[$name] = array($existingValue);
              }
  
              $attributeArray[$name][] = trim($value);
          } else {
              $attributeArray[$name] = trim($value);
          }
      }
code: private function _addAttributeToArray(array &$attributeArray, $name, $value)
      {
          // If multiple attributes exist, add as an array value
          if (isset($attributeArray[$name])) {
              // Initialize the array with the existing value
              if (!is_array($attributeArray[$name])) {
                  $existingValue = $attributeArray[$name];
                  $attributeArray[$name] = array($existingValue);
              }
  
              $attributeArray[$name][] = trim($value);
          } else {
              $attributeArray[$name] = trim($value);
          }
      }
code_tokens: private function _addAttributeToArray ( array & $ attributeArray , $ name , $ value ) { // If multiple attributes exist, add as an array value if ( isset ( $ attributeArray [ $ name ] ) ) { // Initialize the array with the existing value if ( ! is_array ( $ attributeArray [ $ name ] ) ) { $ existingValue = $ attributeArray [ $ name ] ; $ attributeArray [ $ name ] = array ( $ existingValue ) ; } $ attributeArray [ $ name ] [ ] = trim ( $ value ) ; } else { $ attributeArray [ $ name ] = trim ( $ value ) ; } }
docstring: Add an attribute value to an array of attributes.
  
  @param array  &$attributeArray reference to array
  @param string $name            name of attribute
  @param string $value           value of attribute
  
  @return void
docstring_tokens: Add an attribute value to an array of attributes .