<commit_before>module SimpleForm
  module Inputs
    class StringInput < Base
      def input
        @builder.text_field(attribute_name, input_html_options)
      end

      def input_html_options
        input_options = super
        input_options[:size]        ||= [limit, SimpleForm.default_input_size].compact.min
        input_options[:maxlength]   ||= limit if limit
        input_options[:type]        ||= input_type unless input_type == :string
        input_options[:placeholder] ||= placeholder if placeholder
        input_options
      end

      def input_html_classes
        input_type == :string ? super : super.unshift("string")
      end

    protected

      def limit
        column && column.limit
      end

      def placeholder
        @placeholder ||= options[:placeholder] || translate(:placeholder)
      end
    end
  end<commit_msg>Removing useless 'if' conditional<commit_after>module SimpleForm
  module Inputs
    class StringInput < Base
      def input
        @builder.text_field(attribute_name, input_html_options)
      end

      def input_html_options
        input_options = super
        input_options[:size]        ||= [limit, SimpleForm.default_input_size].compact.min
        input_options[:maxlength]   ||= limit if limit
        input_options[:type]        ||= input_type unless input_type == :string
        input_options[:placeholder] ||= placeholder
        input_options
      end

      def input_html_classes
        input_type == :string ? super : super.unshift("string")
      end

    protected

      def limit
        column && column.limit
      end

      def placeholder
        @placeholder ||= options[:placeholder] || translate(:placeholder)
      end
    end
  end
{'fraction_non_alphanumeric': 0.07981492192018508, 'fraction_numerical': 0.0, 'mean_word_length': 2.446215139442231, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6873065', 'n_tokens_mistral': 460, 'n_tokens_neox': 446, 'n_words': 110}