<commit_before>//
//  UITableViewCell+Separator.swift
//  BFWControls
//
//  Created by <NAME> on 12/12/17.
//  Copyright © 2017 BareFeetWare. All rights reserved.
//  Free to use at your own risk, with acknowledgement to BareFeetWare.
//

import UIKit

/// To see the change in the storyboard, you must use a UITabelViewCell subclass that has @IBDesignable, such as DesignableTableViewCell.
public extension UITableViewCell {
    
    /// Arbitrarily large number. Must be larger than any possible screen dimension. Can't be .greatestFiniteMagnitude, since that causes a screen flash when the app is restored from background.
    private static let offScreen: CGFloat = 999999.0

    private static let hiddenInset = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: offScreen)
    
    private var hiddenInset: UIEdgeInsets {
        return type(of: self).hiddenInset
    }
    
    /// Hides the separator in a cell in a table view that is showing cell separators.
    @IBInspectable public var isSeparatorHidden: Bool {
        get {
            return separatorInset == hiddenInset
        }
        set {
            guard let inset: UIEdgeInsets = newValue
                ? hiddenInset
                : superviewTableView?.separatorInset
                else { return }
            separatorInset = inset
        }
    }
    
}<commit_msg>Simplified using hiddenInsetRight instead of hiddenInset<commit_after>//
//  UITableViewCell+Separator.swift
//  BFWControls
//
//  Created by <NAME> on 12/12/17.
//  Copyright © 2017 BareFeetWare. All rights reserved.
//  Free to use at your own risk, with acknowledgement to BareFeetWare.
//

import UIKit

/// To see the change in the storyboard, you must use a UITabelViewCell subclass that has @IBDesignable, such as DesignableTableViewCell.
public extension UITableViewCell {
    
    /// Arbitrarily large number. Must be larger than any possible screen dimension. Can't be .greatestFiniteMagnitude, since that causes a screen flash when the app is restored from background.
    private var hiddenInsetRight: CGFloat {
        return 999999.0
    }

    /// Hides the separator in a cell in a table view that is showing cell separators.
    @IBInspectable public var isSeparatorHidden: Bool {
        get {
            return separatorInset.right == hiddenInsetRight
        }
        set {
            guard let insetRight: CGFloat = newValue
                ? hiddenInsetRight
                : superviewTableView?.separatorInset.right
                else { return }
            separatorInset.right = insetRight
        }
    }
    
}
{'fraction_non_alphanumeric': 0.06700038505968425, 'fraction_numerical': 0.015402387370042356, 'mean_word_length': 2.4456233421750664, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1371155', 'n_tokens_mistral': 775, 'n_tokens_neox': 706, 'n_words': 262}