original_string: public static function decimal($input, $places = 2) {
          if (!$places) {
              $regex = '/^[-+]?[0-9]*\.{1}[0-9]+(?:[eE][-+]?[0-9]+)?$/';
          } else {
              $regex = '/^[-+]?[0-9]*\.{1}[0-9]{' . $places . '}$/';
          }
  
          return static::custom($input, $regex);
      }
code: public static function decimal($input, $places = 2) {
          if (!$places) {
              $regex = '/^[-+]?[0-9]*\.{1}[0-9]+(?:[eE][-+]?[0-9]+)?$/';
          } else {
              $regex = '/^[-+]?[0-9]*\.{1}[0-9]{' . $places . '}$/';
          }
  
          return static::custom($input, $regex);
      }
code_tokens: public static function decimal ( $ input , $ places = 2 ) { if ( ! $ places ) { $ regex = '/^[-+]?[0-9]*\.{1}[0-9]+(?:[eE][-+]?[0-9]+)?$/' ; } else { $ regex = '/^[-+]?[0-9]*\.{1}[0-9]{' . $ places . '}$/' ; } return static :: custom ( $ input , $ regex ) ; }
docstring: Validate input is a decimal.
  
  @param string $input
  @param int $places
  @return bool
docstring_tokens: Validate input is a decimal .