<commit_before>final class UGCAddReviewTextCell: MWMTableViewCell {
  @IBOutlet private weak var textView: MWMTextView! {
    didSet {
      textView.placeholder = L("placepage_reviews_hint")
      textView.font = UIFont.regular16()
      textView.textColor = UIColor.blackPrimaryText()
      textView.placeholderView.textColor = UIColor.blackSecondaryText()
    }
  }

  var reviewText: String! {
    get { return textView.text }
    set { textView.text = newValue }
  }
}

extension UGCAddReviewTextCell: UITextViewDelegate {
}<commit_msg>[MAPSME-5842] [ios] Added 600 characters limit to review text.<commit_after>final class UGCAddReviewTextCell: MWMTableViewCell {
  private enum Const {
    static let maxCharactersCount = 600
  }

  @IBOutlet private weak var textView: MWMTextView! {
    didSet {
      textView.placeholder = L("placepage_reviews_hint")
      textView.font = UIFont.regular16()
      textView.textColor = UIColor.blackPrimaryText()
      textView.placeholderView.textColor = UIColor.blackSecondaryText()
    }
  }

  var reviewText: String! {
    get { return textView.text }
    set { textView.text = newValue }
  }
}

extension UGCAddReviewTextCell: UITextViewDelegate {
  func textView(_: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
    let isNewLengthValid = reviewText.count + text.count - range.length <= Const.maxCharactersCount
    return isNewLengthValid
  }
}
{'fraction_non_alphanumeric': 0.0883785664578984, 'fraction_numerical': 0.009742519137091163, 'mean_word_length': 3.941580756013746, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5664722', 'n_tokens_mistral': 459, 'n_tokens_neox': 446, 'n_words': 95}