original_string: protected function getRuleType($rule)
      {
          if ( ! is_string($rule)) {
              return '';
          }
  
          if (false === ($pos = strpos($rule, ':'))) {
              return $rule;
          }
  
          return substr($rule, 0, $pos);
      }
code: protected function getRuleType($rule)
      {
          if ( ! is_string($rule)) {
              return '';
          }
  
          if (false === ($pos = strpos($rule, ':'))) {
              return $rule;
          }
  
          return substr($rule, 0, $pos);
      }
code_tokens: protected function getRuleType ( $ rule ) { if ( ! is_string ( $ rule ) ) { return '' ; } if ( false === ( $ pos = strpos ( $ rule , ':' ) ) ) { return $ rule ; } return substr ( $ rule , 0 , $ pos ) ; }
docstring: Returns a rule type for a given validation rule.
  
  @param string $rule
  @return string
docstring_tokens: Returns a rule type for a given validation rule .