<commit_before>import Foundation
import XCTest

// NOTE: This file is not intended to be included in the Xcode project or CocoaPods.
//       It is picked up by the Swift Package Manager during its build process.

#if SWIFT_PACKAGE

open class QuickConfiguration: NSObject {
    open class func configure(_ configuration: Configuration) {}
}

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)

internal func qck_enumerateSubclasses<T: AnyObject>(_ klass: T.Type, block: (T.Type) -> Void) {
    var classesCount = objc_getClassList(nil, 0)

    guard classesCount > 0 else {
        return
    }

    let classes = UnsafeMutablePointer<AnyClass?>.allocate(capacity: Int(classesCount))
    classesCount = objc_getClassList(AutoreleasingUnsafeMutablePointer(classes), classesCount)

    var subclass: AnyClass!
    for i in 0..<classesCount {
        subclass = classes[Int(i)]

        guard let superclass = class_getSuperclass(subclass),
            superclass === klass else { return }

        block(subclass as! T.Type) // swiftlint:disable:this force_cast
    }

    free(classes)
}

#endif

#endif<commit_msg>Replace guard let with if to make more readable getting the superclass<commit_after>import Foundation
import XCTest

// NOTE: This file is not intended to be included in the Xcode project or CocoaPods.
//       It is picked up by the Swift Package Manager during its build process.

#if SWIFT_PACKAGE

open class QuickConfiguration: NSObject {
    open class func configure(_ configuration: Configuration) {}
}

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)

internal func qck_enumerateSubclasses<T: AnyObject>(_ klass: T.Type, block: (T.Type) -> Void) {
    var classesCount = objc_getClassList(nil, 0)

    guard classesCount > 0 else {
        return
    }

    let classes = UnsafeMutablePointer<AnyClass?>.allocate(capacity: Int(classesCount))
    classesCount = objc_getClassList(AutoreleasingUnsafeMutablePointer(classes), classesCount)

    var subclass: AnyClass!
    for i in 0..<classesCount {
        subclass = classes[Int(i)]

        if let superclass = class_getSuperclass(subclass), superclass === klass {
            block(subclass as! T.Type) // swiftlint:disable:this force_cast
        }
    }

    free(classes)
}

#endif

#endif
{'fraction_non_alphanumeric': 0.09326880774307084, 'fraction_numerical': 0.0026396832380114386, 'mean_word_length': 3.6313645621181263, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6434460', 'n_tokens_mistral': 695, 'n_tokens_neox': 670, 'n_words': 206}