original_string: protected function findType($foreignKey, $remote)
      {
          if ($remote) {
              if ($this->isBelongsToMany($foreignKey)) {
                  return 'belongsToMany';
              }
              if ($this->isHasOne($foreignKey)) {
                  return 'hasOne';
              }
  
              return 'hasMany';
          } else {
              return 'belongsTo';
          }
      }
code: protected function findType($foreignKey, $remote)
      {
          if ($remote) {
              if ($this->isBelongsToMany($foreignKey)) {
                  return 'belongsToMany';
              }
              if ($this->isHasOne($foreignKey)) {
                  return 'hasOne';
              }
  
              return 'hasMany';
          } else {
              return 'belongsTo';
          }
      }
code_tokens: protected function findType ( $ foreignKey , $ remote ) { if ( $ remote ) { if ( $ this -> isBelongsToMany ( $ foreignKey ) ) { return 'belongsToMany' ; } if ( $ this -> isHasOne ( $ foreignKey ) ) { return 'hasOne' ; } return 'hasMany' ; } else { return 'belongsTo' ; } }
docstring: Try to determine the type of the relation.
  
  @param $foreignKey
  @param $remote
  
  @return string
docstring_tokens: Try to determine the type of the relation .