original_string: protected function _modifyBelongsTo(Event $event)
      {
          $belongsTo = $event->subject->viewVars['associations']['belongsTo'];
  
          foreach ($belongsTo as $i => $association) {
              if ($association['alias'] !== 'Versions' || $association['foreignKey'] !== 'version_id') {
                  continue;
              }
  
              unset($belongsTo[$i]);
          }
  
          return $belongsTo;
      }
code: protected function _modifyBelongsTo(Event $event)
      {
          $belongsTo = $event->subject->viewVars['associations']['belongsTo'];
  
          foreach ($belongsTo as $i => $association) {
              if ($association['alias'] !== 'Versions' || $association['foreignKey'] !== 'version_id') {
                  continue;
              }
  
              unset($belongsTo[$i]);
          }
  
          return $belongsTo;
      }
code_tokens: protected function _modifyBelongsTo ( Event $ event ) { $ belongsTo = $ event -> subject -> viewVars [ 'associations' ] [ 'belongsTo' ] ; foreach ( $ belongsTo as $ i => $ association ) { if ( $ association [ 'alias' ] !== 'Versions' || $ association [ 'foreignKey' ] !== 'version_id' ) { continue ; } unset ( $ belongsTo [ $ i ] ) ; } return $ belongsTo ; }
docstring: Removes unnecessary belongsTo associations
  
  @param Event $event An Event instance
  @return array
docstring_tokens: Removes unnecessary belongsTo associations