original_string: public function fail()
      {
          $args = func_get_args();
          $str = ucfirst(
              $this->prefix.
              ($this->caption ?: str_replace('_', ' ', $this->active_field)).' '.
              lcfirst(array_shift($args))
          );
  
          // Insert any args into placeholders
          if (count($args) > 0) {
              $n = 1;
  
              foreach ($args as $arg) {
                  $tag = sprintf('{{arg%s}}', $n);
                  $str = str_replace($tag, $arg, $str);
                  ++$n;
              }
          }
  
          /** @type Exception_ValidityCheck $e */
          $e = $this->exception((string) ($this->custom_error ?: $str));
          throw $e->setField($this->active_field);
      }
code: public function fail()
      {
          $args = func_get_args();
          $str = ucfirst(
              $this->prefix.
              ($this->caption ?: str_replace('_', ' ', $this->active_field)).' '.
              lcfirst(array_shift($args))
          );
  
          // Insert any args into placeholders
          if (count($args) > 0) {
              $n = 1;
  
              foreach ($args as $arg) {
                  $tag = sprintf('{{arg%s}}', $n);
                  $str = str_replace($tag, $arg, $str);
                  ++$n;
              }
          }
  
          /** @type Exception_ValidityCheck $e */
          $e = $this->exception((string) ($this->custom_error ?: $str));
          throw $e->setField($this->active_field);
      }
code_tokens: public function fail ( ) { $ args = func_get_args ( ) ; $ str = ucfirst ( $ this -> prefix . ( $ this -> caption ? : str_replace ( '_' , ' ' , $ this -> active_field ) ) . ' ' . lcfirst ( array_shift ( $ args ) ) ) ; // Insert any args into placeholders if ( count ( $ args ) > 0 ) { $ n = 1 ; foreach ( $ args as $ arg ) { $ tag = sprintf ( '{{arg%s}}' , $ n ) ; $ str = str_replace ( $ tag , $ arg , $ str ) ; ++ $ n ; } } /** @type Exception_ValidityCheck $e */ $ e = $ this -> exception ( ( string ) ( $ this -> custom_error ? : $ str ) ) ; throw $ e -> setField ( $ this -> active_field ) ; }
docstring: {{{ Methods which are called by the rules
docstring_tokens: {{{ Methods which are called by the rules