original_string: protected function getRelationNameFromRelationInstance(Relation $relation)
      {
          // Get all relations, load instances and compare them loosely
          foreach ($this->info->relations as $relationData) {
  
              if ($relation == $this->model()->{$relationData->method}()) {
                  return $relationData->method;
              }
          }
  
          // @codeCoverageIgnoreStart
          return null;
          // @codeCoverageIgnoreEnd
      }
code: protected function getRelationNameFromRelationInstance(Relation $relation)
      {
          // Get all relations, load instances and compare them loosely
          foreach ($this->info->relations as $relationData) {
  
              if ($relation == $this->model()->{$relationData->method}()) {
                  return $relationData->method;
              }
          }
  
          // @codeCoverageIgnoreStart
          return null;
          // @codeCoverageIgnoreEnd
      }
code_tokens: protected function getRelationNameFromRelationInstance ( Relation $ relation ) { // Get all relations, load instances and compare them loosely foreach ( $ this -> info -> relations as $ relationData ) { if ( $ relation == $ this -> model ( ) -> { $ relationData -> method } ( ) ) { return $ relationData -> method ; } } // @codeCoverageIgnoreStart return null ; // @codeCoverageIgnoreEnd }
docstring: Returns relation method name related to a relation instance.
  
  @param Relation $relation
  @return null|string
docstring_tokens: Returns relation method name related to a relation instance .