original_string: protected function formatMessage($parameter, $ruleName, $ruleParameter, $message = null)
      {
          $message = $message ?: (isset($this->validateMessages[$ruleName]) ? $this->validateMessages[$ruleName] : $this->validateMessages['default']);
          $message = str_replace(':parameter', $parameter, $message);
          $method  = 'format'.ucfirst(Helper::camelCase($ruleName)).'Message';
  
          if (method_exists($this, $method)) {
              return $this->$method($ruleParameter, $message);
          }
  
          return $message;
      }
code: protected function formatMessage($parameter, $ruleName, $ruleParameter, $message = null)
      {
          $message = $message ?: (isset($this->validateMessages[$ruleName]) ? $this->validateMessages[$ruleName] : $this->validateMessages['default']);
          $message = str_replace(':parameter', $parameter, $message);
          $method  = 'format'.ucfirst(Helper::camelCase($ruleName)).'Message';
  
          if (method_exists($this, $method)) {
              return $this->$method($ruleParameter, $message);
          }
  
          return $message;
      }
code_tokens: protected function formatMessage ( $ parameter , $ ruleName , $ ruleParameter , $ message = null ) { $ message = $ message ? : ( isset ( $ this -> validateMessages [ $ ruleName ] ) ? $ this -> validateMessages [ $ ruleName ] : $ this -> validateMessages [ 'default' ] ) ; $ message = str_replace ( ':parameter' , $ parameter , $ message ) ; $ method = 'format' . ucfirst ( Helper :: camelCase ( $ ruleName ) ) . 'Message' ; if ( method_exists ( $ this , $ method ) ) { return $ this -> $ method ( $ ruleParameter , $ message ) ; } return $ message ; }
docstring: Format message for special rule
  
  @param  string $parameter
  @param  string $ruleName
  @param  mixed  $ruleParameter
  @param  string $customMessage
  
  @return string
docstring_tokens: Format message for special rule