<commit_before>// The MIT License (MIT) - Copyright (c) 2016 <NAME>
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import Foundation

/**
     Struct holding the main **EasyPeasy** operations: `layout`, `reload` and
     `clear`
 */
public struct EasyPeasy {
    
    /// Weak reference to the `Item` that owns this wrapper
    weak var item: Item?
    
    /**
         Applies the attributes given to the current item
         - parameter attributes: `Attributes` applied to the `Item`
         - returns: The array of `NSLayoutConstraints` created and applied
     */
    @discardableResult public func layout(_ attributes: Attribute...) -> [NSLayoutConstraint] {
        return self.item?.apply(attributes: attributes) ?? []
    }
    
    /**
         Applies the attributes given to the current item
         - parameter attributes: `Attributes` applied to the `Item`
         - returns: The array of `NSLayoutConstraints` created and applied
     */
    @discardableResult public func layout(_ attributes: [Attribute]) -> [NSLayoutConstraint] {
        return self.item?.apply(attributes: attributes) ?? []
    }
    
    /**
         This method will trigger the recreation of the  created using
         *EasyPeasy* for the current view. `Condition` closures will
         be evaluated again
     */
    public func reload() {
        self.item?.reload()
    }
    
    /**
         Clears all the constraints applied with EasyPeasy to current
         `Item`
     */
    public func clear() {
        self.item?.clear()
    }
    
}

<commit_msg>Import UIKit and AppKit for her respective platform, to fix Use of undeclared type 'NSLayoutConstraint' issue when using with SPM<commit_after>// The MIT License (MIT) - Copyright (c) 2016 <NAME>
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import Foundation

#if os(iOS) || os(tvOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif

/**
     Struct holding the main **EasyPeasy** operations: `layout`, `reload` and
     `clear`
 */
public struct EasyPeasy {
    
    /// Weak reference to the `Item` that owns this wrapper
    weak var item: Item?
    
    /**
         Applies the attributes given to the current item
         - parameter attributes: `Attributes` applied to the `Item`
         - returns: The array of `NSLayoutConstraints` created and applied
     */
    @discardableResult public func layout(_ attributes: Attribute...) -> [NSLayoutConstraint] {
        return self.item?.apply(attributes: attributes) ?? []
    }
    
    /**
         Applies the attributes given to the current item
         - parameter attributes: `Attributes` applied to the `Item`
         - returns: The array of `NSLayoutConstraints` created and applied
     */
    @discardableResult public func layout(_ attributes: [Attribute]) -> [NSLayoutConstraint] {
        return self.item?.apply(attributes: attributes) ?? []
    }
    
    /**
         This method will trigger the recreation of the  created using
         *EasyPeasy* for the current view. `Condition` closures will
         be evaluated again
     */
    public func reload() {
        self.item?.reload()
    }
    
    /**
         Clears all the constraints applied with EasyPeasy to current
         `Item`
     */
    public func clear() {
        self.item?.clear()
    }
    
}


{'fraction_non_alphanumeric': 0.08801722076058359, 'fraction_numerical': 0.0019134178426213825, 'mean_word_length': 2.6176470588235294, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6056855', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1048, 'n_words': 465}