original_string: protected function isPotentialRelationMethod(ReflectionMethod $method)
      {
          if (
                  ! $method->isPublic()
              // Check if we should ignore the method always
              ||  in_array($method->name, $this->getIgnoredRelationNames())
              // If the method has required parameters, we cannot call or use it
              ||  $method->getNumberOfRequiredParameters()
          ) {
              return false;
          }
  
          // Don't examine methods defined in certain namespaces
          foreach ($this->mustNotMatchClass as $regEx) {
              if (preg_match($regEx, $method->class)) {
                  return false;
              }
          }
  
          // Don't examine methods defined in certain files
          $file = $method->getFileName();
          foreach ($this->mustNotMatchFile as $regEx) {
              if (preg_match($regEx, $file)) {
                  return false;
              }
          }
  
          return true;
      }
code: protected function isPotentialRelationMethod(ReflectionMethod $method)
      {
          if (
                  ! $method->isPublic()
              // Check if we should ignore the method always
              ||  in_array($method->name, $this->getIgnoredRelationNames())
              // If the method has required parameters, we cannot call or use it
              ||  $method->getNumberOfRequiredParameters()
          ) {
              return false;
          }
  
          // Don't examine methods defined in certain namespaces
          foreach ($this->mustNotMatchClass as $regEx) {
              if (preg_match($regEx, $method->class)) {
                  return false;
              }
          }
  
          // Don't examine methods defined in certain files
          $file = $method->getFileName();
          foreach ($this->mustNotMatchFile as $regEx) {
              if (preg_match($regEx, $file)) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: protected function isPotentialRelationMethod ( ReflectionMethod $ method ) { if ( ! $ method -> isPublic ( ) // Check if we should ignore the method always || in_array ( $ method -> name , $ this -> getIgnoredRelationNames ( ) ) // If the method has required parameters, we cannot call or use it || $ method -> getNumberOfRequiredParameters ( ) ) { return false ; } // Don't examine methods defined in certain namespaces foreach ( $ this -> mustNotMatchClass as $ regEx ) { if ( preg_match ( $ regEx , $ method -> class ) ) { return false ; } } // Don't examine methods defined in certain files $ file = $ method -> getFileName ( ) ; foreach ( $ this -> mustNotMatchFile as $ regEx ) { if ( preg_match ( $ regEx , $ file ) ) { return false ; } } return true ; }
docstring: Returns whether a reflected method may be an Eloquent relation.
  
  @param ReflectionMethod $method
  @return bool
docstring_tokens: Returns whether a reflected method may be an Eloquent relation .