original_string: protected static function normalize($obj)
      {
          $result = null;
  
          if (is_object($obj)) {
              $obj = (array) $obj;
          }
  
          if (is_array($obj)) {
              foreach ($obj as $key => $value) {
                  $res = self::normalize($value);
                  if (('@attributes' === $key) && ($key)) {
                      $result = $res; // @codeCoverageIgnore
                  } else {
                      $result[$key] = $res;
                  }
              }
          } else {
              $result = $obj;
          }
  
          return $result;
      }
code: protected static function normalize($obj)
      {
          $result = null;
  
          if (is_object($obj)) {
              $obj = (array) $obj;
          }
  
          if (is_array($obj)) {
              foreach ($obj as $key => $value) {
                  $res = self::normalize($value);
                  if (('@attributes' === $key) && ($key)) {
                      $result = $res; // @codeCoverageIgnore
                  } else {
                      $result[$key] = $res;
                  }
              }
          } else {
              $result = $obj;
          }
  
          return $result;
      }
code_tokens: protected static function normalize ( $ obj ) { $ result = null ; if ( is_object ( $ obj ) ) { $ obj = ( array ) $ obj ; } if ( is_array ( $ obj ) ) { foreach ( $ obj as $ key => $ value ) { $ res = self :: normalize ( $ value ) ; if ( ( '@attributes' === $ key ) && ( $ key ) ) { $ result = $ res ; // @codeCoverageIgnore } else { $ result [ $ key ] = $ res ; } } } else { $ result = $ obj ; } return $ result ; }
docstring: Object to array.
  
  
  @param SimpleXMLElement $obj
  
  @return array
docstring_tokens: Object to array .