From be1f8f0c50c0d6a87f3152b28ab264a31d855cb9 Mon Sep 17 00:00:00 2001 From: Alexander Cyon Date: Mon, 12 Aug 2024 19:29:22 +0200 Subject: [PATCH] Fix some typos (#171) --- .../LayoutGroups/ComplexDeclarativeViewController.swift | 4 ++-- Sources/EpoxyBars/BarInstaller/BarWrapperView.swift | 4 ++-- Sources/EpoxyBars/BarModel/BarModel.swift | 4 ++-- .../EpoxyCollectionView/Models/ItemModel/ItemModel.swift | 4 ++-- .../SupplementaryItemModel/SupplementaryItemModel.swift | 4 ++-- Sources/EpoxyCore/Diffing/Collection+Diff.swift | 2 +- .../EpoxyCore/Model/Providers/WillDisplayProviding.swift | 4 ++-- .../EpoxyLayoutGroups/Constrainable/Constrainable.swift | 2 +- Sources/EpoxyLayoutGroups/Groups/HGroup.swift | 8 ++++---- Sources/EpoxyLayoutGroups/Models/GroupItem.swift | 2 +- .../Providers/AccessibilityAlignmentProviding.swift | 2 +- .../ReflowsForAccessibilityTypeSizeProviding.swift | 2 +- .../Types/LayoutGroupUpdateAnimation.swift | 2 +- Sources/EpoxyNavigationController/NavigationQueue.swift | 2 +- Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift | 4 ++-- Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift | 2 +- .../StubTransitionCoordinator.swift | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Example/EpoxyExample/ViewControllers/LayoutGroups/ComplexDeclarativeViewController.swift b/Example/EpoxyExample/ViewControllers/LayoutGroups/ComplexDeclarativeViewController.swift index 0d4228f7..b6faef31 100644 --- a/Example/EpoxyExample/ViewControllers/LayoutGroups/ComplexDeclarativeViewController.swift +++ b/Example/EpoxyExample/ViewControllers/LayoutGroups/ComplexDeclarativeViewController.swift @@ -72,14 +72,14 @@ final class ComplexDeclarativeViewController: UIViewController { ("Purple", UIColor.systemPurple), ] let numberOfItems = Int.random(in: 1..: ViewEpoxyModeled { /// - dataID: An optional ID that uniquely identifies this bar relative to other bars in the /// same bar stack. /// - content: The content of the bar view that will be applied to the view in the `setContent` - /// closure whenver it has changed. + /// closure whenever it has changed. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new bar /// model that replaced an old bar model with the same `dataID` has content that is not equal @@ -65,7 +65,7 @@ public struct BarModel: ViewEpoxyModeled { /// - params: The parameters used to construct an instance of the view, passed into the /// `makeView` function and used as a view reuse identifier. /// - content: The content of the bar view that will be applied to the view in the - /// `setContent` closure whenver it has changed. + /// `setContent` closure whenever it has changed. /// - makeView: A closure that's called with `params` to construct view instances as required. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new bar diff --git a/Sources/EpoxyCollectionView/Models/ItemModel/ItemModel.swift b/Sources/EpoxyCollectionView/Models/ItemModel/ItemModel.swift index c618e15d..810205fb 100644 --- a/Sources/EpoxyCollectionView/Models/ItemModel/ItemModel.swift +++ b/Sources/EpoxyCollectionView/Models/ItemModel/ItemModel.swift @@ -31,7 +31,7 @@ public struct ItemModel: ViewEpoxyModeled { /// - dataID: An ID that uniquely identifies this item relative to other items in the /// same collection. /// - content: The content of the item view that will be applied to the view in the - /// `setContent` closure whenver it has changed. + /// `setContent` closure whenever it has changed. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new item /// model that replaced an old item model with the same `dataID` has content that is not equal @@ -60,7 +60,7 @@ public struct ItemModel: ViewEpoxyModeled { /// - params: The parameters used to construct an instance of the view, passed into the /// `makeView` function and used as a view reuse identifier. /// - content: The content of the item view that will be applied to the view in the - /// `setContent` closure whenver it has changed. + /// `setContent` closure whenever it has changed. /// - makeView: A closure that's called with `params` to construct view instances as required. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new item diff --git a/Sources/EpoxyCollectionView/Models/SupplementaryItemModel/SupplementaryItemModel.swift b/Sources/EpoxyCollectionView/Models/SupplementaryItemModel/SupplementaryItemModel.swift index d0daf1c2..5cf06777 100644 --- a/Sources/EpoxyCollectionView/Models/SupplementaryItemModel/SupplementaryItemModel.swift +++ b/Sources/EpoxyCollectionView/Models/SupplementaryItemModel/SupplementaryItemModel.swift @@ -31,7 +31,7 @@ public struct SupplementaryItemModel: ViewEpoxyModeled { /// - dataID: An ID that uniquely identifies this item relative to other items in the /// same collection. /// - content: The content of the item view that will be applied to the view in the - /// `setContent` closure whenver it has changed. + /// `setContent` closure whenever it has changed. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new item /// model that replaced an old item model with the same `dataID` has content that is not equal @@ -60,7 +60,7 @@ public struct SupplementaryItemModel: ViewEpoxyModeled { /// - params: The parameters used to construct an instance of the view, passed into the /// `makeView` function and used as a view reuse identifier. /// - content: The content of the item view that will be applied to the view in the - /// `setContent` closure whenver it has changed. + /// `setContent` closure whenever it has changed. /// - makeView: A closure that's called with `params` to construct view instances as required. /// - setContent: A closure that's called to configure the view with its content, both /// immediately following its construction in `makeView` and subsequently whenever a new item diff --git a/Sources/EpoxyCore/Diffing/Collection+Diff.swift b/Sources/EpoxyCore/Diffing/Collection+Diff.swift index dadab6a0..a8798035 100644 --- a/Sources/EpoxyCore/Diffing/Collection+Diff.swift +++ b/Sources/EpoxyCore/Diffing/Collection+Diff.swift @@ -203,7 +203,7 @@ extension Collection where Element: DiffableSection, Index == Int { // MARK: - Entry -/// A bookkeeping refrence type for the diffing algorithm. +/// A bookkeeping reference type for the diffing algorithm. private final class Entry { // MARK: Internal diff --git a/Sources/EpoxyCore/Model/Providers/WillDisplayProviding.swift b/Sources/EpoxyCore/Model/Providers/WillDisplayProviding.swift index 5e59f2f8..4f59efb0 100644 --- a/Sources/EpoxyCore/Model/Providers/WillDisplayProviding.swift +++ b/Sources/EpoxyCore/Model/Providers/WillDisplayProviding.swift @@ -17,11 +17,11 @@ extension CallbackContextEpoxyModeled where Self: WillDisplayProviding { // MARK: Public /// A closure that's called when a view is about to be displayed, before it has been added to the - /// view hierarcy. + /// view hierarchy. public typealias WillDisplay = (_ context: CallbackContext) -> Void /// A closure that's called when the view is about to be displayed, before it has been added to - /// the view hierarcy. + /// the view hierarchy. public var willDisplay: WillDisplay? { get { self[willDisplayProperty] } set { self[willDisplayProperty] = newValue } diff --git a/Sources/EpoxyLayoutGroups/Constrainable/Constrainable.swift b/Sources/EpoxyLayoutGroups/Constrainable/Constrainable.swift index b761d61d..4718bec6 100644 --- a/Sources/EpoxyLayoutGroups/Constrainable/Constrainable.swift +++ b/Sources/EpoxyLayoutGroups/Constrainable/Constrainable.swift @@ -6,7 +6,7 @@ import UIKit // MARK: - Constrainable -/// Defines something that can be constrainted with AutoLayout +/// Defines something that can be constrained with AutoLayout public protocol Constrainable { var leadingAnchor: NSLayoutXAxisAnchor { get } var trailingAnchor: NSLayoutXAxisAnchor { get } diff --git a/Sources/EpoxyLayoutGroups/Groups/HGroup.swift b/Sources/EpoxyLayoutGroups/Groups/HGroup.swift index 3c80010a..3644dd72 100644 --- a/Sources/EpoxyLayoutGroups/Groups/HGroup.swift +++ b/Sources/EpoxyLayoutGroups/Groups/HGroup.swift @@ -43,7 +43,7 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup { /// - alignment: The alignment used within the group. Individual item alignments will /// take precedence over this value /// - accessibilityAlignment: The accessibility alignment for the items within a group. - /// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true` + /// these will only be used when `reflowsForAccessibilityTypeSizes` is `true` /// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`. /// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`. /// Individual item alignments will take precedence over this value @@ -81,7 +81,7 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup { /// - alignment: The alignment used within the group. Individual item alignments will /// take precedence over this value /// - accessibilityAlignment: The accessibility alignment for the items within a group. - /// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true` + /// these will only be used when `reflowsForAccessibilityTypeSizes` is `true` /// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`. /// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`. /// Individual item alignments will take precedence over this value @@ -118,14 +118,14 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup { /// - alignment: The alignment used within the group. Individual item alignments will /// take precedence over this value /// - accessibilityAlignment: The accessibility alignment for the items within a group. - /// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true` + /// these will only be used when `reflowsForAccessibilityTypeSizes` is `true` /// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`. /// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`. /// Individual item alignments will take precedence over this value. /// The default value of this property is `.leading` /// - spacing: the spacing between items of the group /// - reflowsForAccessibilityTypeSizes: whether or not this group should reflow when DynamicType - /// is enabled and is an accessiblity size category. + /// is enabled and is an accessibility size category. /// The default value is `true` /// - forceVerticalAccessibilityLayout: force the group to use the the vertical accessibility layout /// - animation: define style properties for animated group updates, with a default `spring` animation curve. diff --git a/Sources/EpoxyLayoutGroups/Models/GroupItem.swift b/Sources/EpoxyLayoutGroups/Models/GroupItem.swift index 03707d04..2c7213df 100644 --- a/Sources/EpoxyLayoutGroups/Models/GroupItem.swift +++ b/Sources/EpoxyLayoutGroups/Models/GroupItem.swift @@ -150,7 +150,7 @@ extension GroupItem where ItemType: UIView { /// Set the content compression resistance priority for the underlying UIView. /// Calling this method on a GroupItem for a non-UIView class will do nothing. /// - Parameters: - /// - priority: the content compression resitance priority + /// - priority: the content compression resistance priority /// - axis: the axis this priority should be applied to /// - Returns: a copy of the model with the priority set public func contentCompressionResistancePriority( diff --git a/Sources/EpoxyLayoutGroups/Providers/AccessibilityAlignmentProviding.swift b/Sources/EpoxyLayoutGroups/Providers/AccessibilityAlignmentProviding.swift index 3471303a..13827fc9 100644 --- a/Sources/EpoxyLayoutGroups/Providers/AccessibilityAlignmentProviding.swift +++ b/Sources/EpoxyLayoutGroups/Providers/AccessibilityAlignmentProviding.swift @@ -28,7 +28,7 @@ extension EpoxyModeled where Self: AccessibilityAlignmentProviding { set { self[accessibilityAlignmentProperty] = newValue } } - /// Returns a copy of this model replacing the `accessibiltyAlignment` value + /// Returns a copy of this model replacing the `accessibilityAlignment` value /// with the one provided. public func accessibilityAlignment(_ value: VGroup.ItemAlignment?) -> Self { copy(updating: accessibilityAlignmentProperty, to: value) diff --git a/Sources/EpoxyLayoutGroups/Providers/ReflowsForAccessibilityTypeSizeProviding.swift b/Sources/EpoxyLayoutGroups/Providers/ReflowsForAccessibilityTypeSizeProviding.swift index d92a6210..41727138 100644 --- a/Sources/EpoxyLayoutGroups/Providers/ReflowsForAccessibilityTypeSizeProviding.swift +++ b/Sources/EpoxyLayoutGroups/Providers/ReflowsForAccessibilityTypeSizeProviding.swift @@ -10,7 +10,7 @@ public protocol ReflowsForAccessibilityTypeSizeProviding { /// Only used in HGroup. Whether or not the HGroup should reflow for accessibility /// type sizes. When this value is `true` the `HGroup` will reflow when /// `preferredContentSizeCategory.isAccessibilityCategory` is `true`. The `HGroup` reflows - /// to model a `VGroup` and uses the `accessibiltyAlignment` value to determine item alignments. + /// to model a `VGroup` and uses the `accessibilityAlignment` value to determine item alignments. var reflowsForAccessibilityTypeSizes: Bool { get } } diff --git a/Sources/EpoxyLayoutGroups/Types/LayoutGroupUpdateAnimation.swift b/Sources/EpoxyLayoutGroups/Types/LayoutGroupUpdateAnimation.swift index 5b823888..77b5df26 100644 --- a/Sources/EpoxyLayoutGroups/Types/LayoutGroupUpdateAnimation.swift +++ b/Sources/EpoxyLayoutGroups/Types/LayoutGroupUpdateAnimation.swift @@ -34,7 +34,7 @@ extension LayoutGroupUpdateAnimation { /// - duration: a TimeInterval for animation duration, with a default value of `0.5` /// - delay: a TimeInterval for animation duration, with a default value of `0.0` /// - dampingRatio: a value for spring damping ratio, with a default value of `1.0` - /// - initialSpringVelocity: a value for initial spring velocity, wiht a default value of `0.0` + /// - initialSpringVelocity: a value for initial spring velocity, with a default value of `0.0` public static func spring( duration: TimeInterval = 0.5, delay: TimeInterval = 0.0, diff --git a/Sources/EpoxyNavigationController/NavigationQueue.swift b/Sources/EpoxyNavigationController/NavigationQueue.swift index 8901d2b0..2fe1646b 100644 --- a/Sources/EpoxyNavigationController/NavigationQueue.swift +++ b/Sources/EpoxyNavigationController/NavigationQueue.swift @@ -9,7 +9,7 @@ import UIKit /// The interface that's available to a `NavigationQueue` to manage the visible view controllers /// within a navigation stack. /// -/// Rougly matches the API of `UINavigationController`. +/// Roughly matches the API of `UINavigationController`. protocol NavigationInterface: AnyObject { /// The active transition coordinator object. var transitionCoordinator: UIViewControllerTransitionCoordinator? { get } diff --git a/Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift b/Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift index 6f7f9892..621f632d 100644 --- a/Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift +++ b/Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift @@ -89,7 +89,7 @@ final class CollectionDiffSpec: QuickSpec { ] describe("makeChangeset") { - context("with called on an indentical collection") { + context("with called on an identical collection") { it("returns an empty changeset") { let changeset = intArray.makeChangeset(from: intArray) expect(changeset.inserts).to(beEmpty()) @@ -550,7 +550,7 @@ final class CollectionDiffSpec: QuickSpec { } describe("makeSectionedChangeset") { - context("with called on an indentical collection") { + context("with called on an identical collection") { it("returns an empty changeset") { let changeset = testSectionedDiffableArray.makeSectionedChangeset( from: testSectionedDiffableArray) diff --git a/Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift b/Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift index dc1e50b8..d8ba2422 100644 --- a/Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift +++ b/Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift @@ -112,7 +112,7 @@ final class HGroupSpec: QuickSpec { } } - // MARK: reflowsForAccessibiltiyTypeSizes = true + // MARK: reflowsForAccessibilityTypeSizes = true describe("when reflowsForAccessibilityTypeSizes is true") { describe("when the preferred type size is not an accessibility size") { diff --git a/Tests/EpoxyTests/NavigationControllerTests/StubTransitionCoordinator.swift b/Tests/EpoxyTests/NavigationControllerTests/StubTransitionCoordinator.swift index f62ec884..678613bb 100644 --- a/Tests/EpoxyTests/NavigationControllerTests/StubTransitionCoordinator.swift +++ b/Tests/EpoxyTests/NavigationControllerTests/StubTransitionCoordinator.swift @@ -73,7 +73,7 @@ extension StubTransitionCoordinator: UIViewControllerTransitionCoordinator { // swiftlint:disable unavailable_function func notifyWhenInteractionChanges(_: @escaping (UIViewControllerTransitionCoordinatorContext) -> Void) { - fatalError("Not implmented") + fatalError("Not implemented") } func viewController(forKey key: UITransitionContextViewControllerKey) -> UIViewController? {