original_string: public function get_alignments() {
          global $DB;
          $badgeid = $this->_data->id;
          $alignments = array();
          $items = $DB->get_records_select('badge_alignment', 'badgeid = ?', array($badgeid));
          foreach ($items as $item) {
              $alignment = array('targetName' => $item->targetname, 'targetUrl' => $item->targeturl);
              if ($item->targetdescription) {
                  $alignment['targetDescription'] = $item->targetdescription;
              }
              if ($item->targetframework) {
                  $alignment['targetFramework'] = $item->targetframework;
              }
              if ($item->targetcode) {
                  $alignment['targetCode'] = $item->targetcode;
              }
              $alignments[] = $alignment;
          }
          return $alignments;
      }
code: public function get_alignments() {
          global $DB;
          $badgeid = $this->_data->id;
          $alignments = array();
          $items = $DB->get_records_select('badge_alignment', 'badgeid = ?', array($badgeid));
          foreach ($items as $item) {
              $alignment = array('targetName' => $item->targetname, 'targetUrl' => $item->targeturl);
              if ($item->targetdescription) {
                  $alignment['targetDescription'] = $item->targetdescription;
              }
              if ($item->targetframework) {
                  $alignment['targetFramework'] = $item->targetframework;
              }
              if ($item->targetcode) {
                  $alignment['targetCode'] = $item->targetcode;
              }
              $alignments[] = $alignment;
          }
          return $alignments;
      }
code_tokens: public function get_alignments ( ) { global $ DB ; $ badgeid = $ this -> _data -> id ; $ alignments = array ( ) ; $ items = $ DB -> get_records_select ( 'badge_alignment' , 'badgeid = ?' , array ( $ badgeid ) ) ; foreach ( $ items as $ item ) { $ alignment = array ( 'targetName' => $ item -> targetname , 'targetUrl' => $ item -> targeturl ) ; if ( $ item -> targetdescription ) { $ alignment [ 'targetDescription' ] = $ item -> targetdescription ; } if ( $ item -> targetframework ) { $ alignment [ 'targetFramework' ] = $ item -> targetframework ; } if ( $ item -> targetcode ) { $ alignment [ 'targetCode' ] = $ item -> targetcode ; } $ alignments [ ] = $ alignment ; } return $ alignments ; }
docstring: Get alignment of the badge.
  
  @return array information.
docstring_tokens: Get alignment of the badge .