<commit_before>//
//  Stevia+Size.swift
//  Stevia
//
//  Created by <NAME> on 10/02/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

public extension UIView {
    
    public func size(points:CGFloat) -> UIView {
        width(points)
        height(points)
        return self
    }
    
    public func height(points:CGFloat) -> UIView {
        return size(.Height, points: points)
    }
    
    public func width(points:CGFloat) -> UIView {
        return size(.Width, points: points)
    }
    
    private func size(attribute:NSLayoutAttribute, points:CGFloat) -> UIView {
        let c = constraint(item: self, attribute:attribute, constant: points)
        addConstraint(c)
        return self
    }
    
}<commit_msg>Adds Equal size methods<commit_after>//
//  Stevia+Size.swift
//  Stevia
//
//  Created by <NAME> on 10/02/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

public extension UIView {
    
    public func size(points:CGFloat) -> UIView {
        width(points)
        height(points)
        return self
    }
    
    public func height(points:CGFloat) -> UIView {
        return size(.Height, points: points)
    }
    
    public func width(points:CGFloat) -> UIView {
        return size(.Width, points: points)
    }
    
    private func size(attribute:NSLayoutAttribute, points:CGFloat) -> UIView {
        let c = constraint(item: self, attribute:attribute, constant: points)
        addConstraint(c)
        return self
    }
    
}

func equalSizes(views:[UIView]) -> [UIView] {
    equalHeights(views)
    equalWidths(views)
    return views
}

func equalWidths(views:[UIView]) -> [UIView] {
    equal(.Width, views: views)
    return views
}

func equalHeights(views:[UIView]) -> [UIView] {
    equal(.Height, views: views)
    return views
}

func equal(attribute:NSLayoutAttribute,views:[UIView]) {
    var previousView:UIView?
    for v in views {
        if let pv = previousView {
            if let spv = v.superview {
                spv.c(item: v, attribute: attribute, toItem: pv)
            }
        }
        previousView = v
    }
}




{'fraction_non_alphanumeric': 0.11479234717685488, 'fraction_numerical': 0.009332711152589827, 'mean_word_length': 2.2782874617737003, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 18, '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': '3861041', 'n_tokens_mistral': 687, 'n_tokens_neox': 661, 'n_words': 168}