original_string: public function debug()
      {
          $info = array();
  
          $metadata = $this->getMetadata();
  
          $referenceFields = array();
          foreach (array_merge($metadata['referencesOne'], $metadata['referencesMany']) as $name => $reference) {
              $referenceFields[] = $reference['field'];
          }
  
          // fields
          foreach ($metadata['fields'] as $name => $field) {
              if (in_array($name, $referenceFields)) {
                  continue;
              }
              $info['fields'][$name] = $this->{'get'.ucfirst($name)}();
          }
  
          // referencesOne
          foreach ($metadata['referencesOne'] as $name => $referenceOne) {
              $info['referencesOne'][$name] = $this->{'get'.ucfirst($referenceOne['field'])}();
          }
  
          // referencesMany
          foreach ($metadata['referencesMany'] as $name => $referenceMany) {
              $info['referencesMany'][$name] = $this->{'get'.ucfirst($referenceMany['field'])}();
          }
  
          // embeddedsOne
          foreach ($metadata['embeddedsOne'] as $name => $embeddedOne) {
              $embedded = $this->{'get'.ucfirst($name)}();
              $info['embeddedsOne'][$name] = $embedded ? $embedded->debug() : null;
          }
  
          // embeddedsMany
          foreach ($metadata['embeddedsMany'] as $name => $embeddedMany) {
              $info['embeddedsMany'][$name] = array();
              foreach ($this->{'get'.ucfirst($name)}() as $key => $value) {
                  $info['embeddedsMany'][$name][$key] = $value->debug();
              }
          }
  
          return $info;
      }
code: public function debug()
      {
          $info = array();
  
          $metadata = $this->getMetadata();
  
          $referenceFields = array();
          foreach (array_merge($metadata['referencesOne'], $metadata['referencesMany']) as $name => $reference) {
              $referenceFields[] = $reference['field'];
          }
  
          // fields
          foreach ($metadata['fields'] as $name => $field) {
              if (in_array($name, $referenceFields)) {
                  continue;
              }
              $info['fields'][$name] = $this->{'get'.ucfirst($name)}();
          }
  
          // referencesOne
          foreach ($metadata['referencesOne'] as $name => $referenceOne) {
              $info['referencesOne'][$name] = $this->{'get'.ucfirst($referenceOne['field'])}();
          }
  
          // referencesMany
          foreach ($metadata['referencesMany'] as $name => $referenceMany) {
              $info['referencesMany'][$name] = $this->{'get'.ucfirst($referenceMany['field'])}();
          }
  
          // embeddedsOne
          foreach ($metadata['embeddedsOne'] as $name => $embeddedOne) {
              $embedded = $this->{'get'.ucfirst($name)}();
              $info['embeddedsOne'][$name] = $embedded ? $embedded->debug() : null;
          }
  
          // embeddedsMany
          foreach ($metadata['embeddedsMany'] as $name => $embeddedMany) {
              $info['embeddedsMany'][$name] = array();
              foreach ($this->{'get'.ucfirst($name)}() as $key => $value) {
                  $info['embeddedsMany'][$name][$key] = $value->debug();
              }
          }
  
          return $info;
      }
code_tokens: public function debug ( ) { $ info = array ( ) ; $ metadata = $ this -> getMetadata ( ) ; $ referenceFields = array ( ) ; foreach ( array_merge ( $ metadata [ 'referencesOne' ] , $ metadata [ 'referencesMany' ] ) as $ name => $ reference ) { $ referenceFields [ ] = $ reference [ 'field' ] ; } // fields foreach ( $ metadata [ 'fields' ] as $ name => $ field ) { if ( in_array ( $ name , $ referenceFields ) ) { continue ; } $ info [ 'fields' ] [ $ name ] = $ this -> { 'get' . ucfirst ( $ name ) } ( ) ; } // referencesOne foreach ( $ metadata [ 'referencesOne' ] as $ name => $ referenceOne ) { $ info [ 'referencesOne' ] [ $ name ] = $ this -> { 'get' . ucfirst ( $ referenceOne [ 'field' ] ) } ( ) ; } // referencesMany foreach ( $ metadata [ 'referencesMany' ] as $ name => $ referenceMany ) { $ info [ 'referencesMany' ] [ $ name ] = $ this -> { 'get' . ucfirst ( $ referenceMany [ 'field' ] ) } ( ) ; } // embeddedsOne foreach ( $ metadata [ 'embeddedsOne' ] as $ name => $ embeddedOne ) { $ embedded = $ this -> { 'get' . ucfirst ( $ name ) } ( ) ; $ info [ 'embeddedsOne' ] [ $ name ] = $ embedded ? $ embedded -> debug ( ) : null ; } // embeddedsMany foreach ( $ metadata [ 'embeddedsMany' ] as $ name => $ embeddedMany ) { $ info [ 'embeddedsMany' ] [ $ name ] = array ( ) ; foreach ( $ this -> { 'get' . ucfirst ( $ name ) } ( ) as $ key => $ value ) { $ info [ 'embeddedsMany' ] [ $ name ] [ $ key ] = $ value -> debug ( ) ; } } return $ info ; }
docstring: Returns an array with the document info to debug.
  
  @return array An array with the document info.
docstring_tokens: Returns an array with the document info to debug .