diff --git a/Source/API/Groups/PDFGroupContainer.swift b/Source/API/Groups/PDFGroupContainer.swift index ee64ae95..ccc14494 100644 --- a/Source/API/Groups/PDFGroupContainer.swift +++ b/Source/API/Groups/PDFGroupContainer.swift @@ -42,7 +42,7 @@ public enum PDFGroupContainer { /** Array of all possible containers, expect `.none`. - Useful for initalizing default values for each container + Useful for initializing default values for each container */ internal static var all: [PDFGroupContainer] { [.left, .center, .right] diff --git a/Source/API/Layout/PDFContainer.swift b/Source/API/Layout/PDFContainer.swift index 22c273e6..c4b4f95e 100644 --- a/Source/API/Layout/PDFContainer.swift +++ b/Source/API/Layout/PDFContainer.swift @@ -120,7 +120,7 @@ public enum PDFContainer: CaseIterable { /** Array of all possible containers, expect `.none`. - Useful for initalizing default values for each container + Useful for initializing default values for each container */ internal static var all: [PDFContainer] { [ diff --git a/Source/API/PDFGeneratorProtocol.swift b/Source/API/PDFGeneratorProtocol.swift index b1818c45..cb40b385 100644 --- a/Source/API/PDFGeneratorProtocol.swift +++ b/Source/API/PDFGeneratorProtocol.swift @@ -28,7 +28,7 @@ public protocol PDFGeneratorProtocol: AnyObject { Keep in mind, the output file is in a temporary folder of the OS and should be persisted by your own logic. - parameter filename: Name of output file, `.pdf` will be appended if not given - - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initialiser of `PDFInfo` + - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initializer of `PDFInfo` - returns: Temporary URL to the output file @@ -98,7 +98,7 @@ extension PDFGeneratorProtocol { Keep in mind, the output file is in a temporary folder of the OS and should be persisted by your own logic. - parameter filename: Name of output file, `.pdf` will be appended if not given - - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initialiser of `PDFInfo` + - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initializer of `PDFInfo` - returns: Temporary URL to the output file diff --git a/Source/API/PDFMultiDocumentGenerator.swift b/Source/API/PDFMultiDocumentGenerator.swift index b34c90c5..352f2377 100644 --- a/Source/API/PDFMultiDocumentGenerator.swift +++ b/Source/API/PDFMultiDocumentGenerator.swift @@ -17,12 +17,12 @@ import AppKit public class PDFMultiDocumentGenerator: PDFGeneratorProtocol { /** - Bounds of first document, set on initialisation + Bounds of first document, set on initialization */ private let bounds: CGRect /** - Metadata information of first document, set on initialisation + Metadata information of first document, set on initialization */ private let info: PDFInfo @@ -47,10 +47,10 @@ public class PDFMultiDocumentGenerator: PDFGeneratorProtocol { public var debug = false /** - Initialises a new multi-document generator for generating the giving documents. + Initializes a new multi-document generator for generating the giving documents. It will use the page layout of the first document. - The instance property `progress` is initalised to the total document count. + The instance property `progress` is initialized to the total document count. - parameter documents: Array of `PDFDocument` instances, which will all be rendered into a single PDF context */ @@ -79,7 +79,7 @@ public class PDFMultiDocumentGenerator: PDFGeneratorProtocol { Creates a file at the given file URL, generates the PDF context data and writes the result idata nto the file. - parameter target: URL of output file, - - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initialiser of `PDFInfo` + - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initializer of `PDFInfo` - throws: Exception, if something went wrong */ @@ -98,7 +98,7 @@ public class PDFMultiDocumentGenerator: PDFGeneratorProtocol { /** Generates and returns the PDF context data. - - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initialiser of `PDFInfo` + - parameter info: Instance of `PDFInfo` with meta file information, defaults to default initializer of `PDFInfo` - throws: Exception, if something went wrong diff --git a/Source/API/Text/PDFSimpleText.swift b/Source/API/Text/PDFSimpleText.swift index 6db54f1a..accfee0c 100644 --- a/Source/API/Text/PDFSimpleText.swift +++ b/Source/API/Text/PDFSimpleText.swift @@ -34,7 +34,7 @@ public class PDFSimpleText: PDFText { public weak var style: PDFTextStyle? /** - Initalizer + Initializer - parameter text: Text to be drawn - parameter spacing: Spacing between text lines, defaults to 0 diff --git a/Source/API/Text/PDFTextStyle.swift b/Source/API/Text/PDFTextStyle.swift index ac735bd2..dd67ccd6 100644 --- a/Source/API/Text/PDFTextStyle.swift +++ b/Source/API/Text/PDFTextStyle.swift @@ -32,7 +32,7 @@ public class PDFTextStyle: Hashable { public var color: Color? /** - Initalizer + Initializer - parameter name: Name of style - parameter font: Font of text, defaults to nil diff --git a/Source/Internal/Image/PDFImageObject.swift b/Source/Internal/Image/PDFImageObject.swift index 605b1be0..988f2b60 100644 --- a/Source/Internal/Image/PDFImageObject.swift +++ b/Source/Internal/Image/PDFImageObject.swift @@ -27,7 +27,7 @@ internal class PDFImageObject: PDFRenderObject { internal var captionSpacing: CGFloat /** - Initalizer + Initializer - parameter image: Image object - parameter captionSpacing: Spacing to caption, defaults to zero diff --git a/Source/Internal/Layout/PDFLayoutHeights.swift b/Source/Internal/Layout/PDFLayoutHeights.swift index e4bbaf73..747549c9 100644 --- a/Source/Internal/Layout/PDFLayoutHeights.swift +++ b/Source/Internal/Layout/PDFLayoutHeights.swift @@ -32,7 +32,7 @@ internal struct PDFLayoutHeights: CustomStringConvertible { internal var content: CGFloat = 0 /** - Initialises the heights by resetting the headers and footers + Initializes the heights by resetting the headers and footers */ internal init() { resetHeaderFooterHeight() diff --git a/Source/Internal/Layout/PDFSectionColumnContainer.swift b/Source/Internal/Layout/PDFSectionColumnContainer.swift index 88b64dd0..b2799006 100644 --- a/Source/Internal/Layout/PDFSectionColumnContainer.swift +++ b/Source/Internal/Layout/PDFSectionColumnContainer.swift @@ -32,7 +32,7 @@ public enum PDFSectionColumnContainer { /** Array of all possible containers, expect `.none`. - Useful for initalizing default values for each container + Useful for initializing default values for each container */ internal static var all: [PDFSectionColumnContainer] { [.left, .center, .right] diff --git a/Source/Internal/Text/PDFAttributedTextObject.swift b/Source/Internal/Text/PDFAttributedTextObject.swift index 818a3ed2..a05478e8 100644 --- a/Source/Internal/Text/PDFAttributedTextObject.swift +++ b/Source/Internal/Text/PDFAttributedTextObject.swift @@ -59,7 +59,7 @@ internal class PDFAttributedTextObject: PDFRenderObject { } /** - Initalize with simple text object. + Initialize with simple text object. Will be converted into a attributed string using the default values from the generator. - parameter simpleText: Simple text object diff --git a/Source/Internal/Text/PDFFontObject.swift b/Source/Internal/Text/PDFFontObject.swift index 471da970..fc53fbde 100644 --- a/Source/Internal/Text/PDFFontObject.swift +++ b/Source/Internal/Text/PDFFontObject.swift @@ -22,7 +22,7 @@ internal class PDFFontObject: PDFRenderObject { internal var font: Font /** - Initalizer + Initializer - parameter font: New font */ diff --git a/Source/Internal/Text/PDFTextColorObject.swift b/Source/Internal/Text/PDFTextColorObject.swift index ae4e28d5..b12df76f 100644 --- a/Source/Internal/Text/PDFTextColorObject.swift +++ b/Source/Internal/Text/PDFTextColorObject.swift @@ -22,7 +22,7 @@ internal class PDFTextColorObject: PDFRenderObject { internal var color: Color /** - Initalizer + Initializer - parameter textColor: New text color */ diff --git a/Tests/TPPDFTests/Graphics/PDFLineSeparatorObject_Spec.swift b/Tests/TPPDFTests/Graphics/PDFLineSeparatorObject_Spec.swift index a412526a..de29ea0a 100644 --- a/Tests/TPPDFTests/Graphics/PDFLineSeparatorObject_Spec.swift +++ b/Tests/TPPDFTests/Graphics/PDFLineSeparatorObject_Spec.swift @@ -25,14 +25,14 @@ class PDFLineSeparatorObject_Spec: QuickSpec { } } - context("initalizers") { + context("initializers") { - it("can be initalized without") { + it("can be initialized without") { separator = PDFLineSeparatorObject() expect(separator).toNot(beNil()) } - it("can be initalized with a line style") { + it("can be initialized with a line style") { let style = PDFLineStyle(type: .dotted, color: .orange, width: 0.25) separator = PDFLineSeparatorObject(style: style) diff --git a/Tests/TPPDFTests/Graphics/PDFLineStyle_Spec.swift b/Tests/TPPDFTests/Graphics/PDFLineStyle_Spec.swift index 0345c736..4dfc34a6 100644 --- a/Tests/TPPDFTests/Graphics/PDFLineStyle_Spec.swift +++ b/Tests/TPPDFTests/Graphics/PDFLineStyle_Spec.swift @@ -26,14 +26,14 @@ class PDFLineStyle_Spec: QuickSpec { lineStyle = PDFLineStyle() } - it("can be initalized with empty initalizer") { + it("can be initialized with empty initializer") { lineStyle = PDFLineStyle() expect(lineStyle.type) == PDFLineType.full expect(lineStyle.color) == Color.black expect(lineStyle.width) == 0.25 } - it("can be initalized with values") { + it("can be initialized with values") { lineStyle = PDFLineStyle(type: type, color: color, width: width) expect(lineStyle.type) == type expect(lineStyle.color) == color diff --git a/Tests/TPPDFTests/Graphics/UIColor+Hex_Spec.swift b/Tests/TPPDFTests/Graphics/UIColor+Hex_Spec.swift index b884554d..9085d44c 100644 --- a/Tests/TPPDFTests/Graphics/UIColor+Hex_Spec.swift +++ b/Tests/TPPDFTests/Graphics/UIColor+Hex_Spec.swift @@ -15,33 +15,33 @@ class Color_Hex_Spec: QuickSpec { override func spec() { describe("Color+Hex") { - it("can be initalized with three digit hex") { + it("can be initialized with three digit hex") { let color = try? Color(hex: "3F0") expect(color) == Color(red: 0.2, green: 1.0, blue: 0, alpha: 1) } - it("can be initalized with four digit hex") { + it("can be initialized with four digit hex") { let color = try? Color(hex: "3F0C") expect(color) == Color(red: 0.2, green: 1.0, blue: 0, alpha: 0.8) } - it("can be initalized with six digit hex") { + it("can be initialized with six digit hex") { let color = try? Color(hex: "FF00FF") expect(color) == Color.magenta } - it("can be initalized with eight digit hex") { + it("can be initialized with eight digit hex") { let color = try? Color(hex: "FFFF0000") expect(color) == Color.yellow.withAlphaComponent(0.0) } - it("can not be initalized with other length") { + it("can not be initialized with other length") { expect { try Color(hex: "1234567890") }.to(throwError()) } - it("can not be initalized with invalid hexadecimal characters") { + it("can not be initialized with invalid hexadecimal characters") { expect { try Color(hex: "%") }.to(throwError()) diff --git a/Tests/TPPDFTests/Image/PDFImage_Spec.swift b/Tests/TPPDFTests/Image/PDFImage_Spec.swift index 465bbcb3..dad45d18 100644 --- a/Tests/TPPDFTests/Image/PDFImage_Spec.swift +++ b/Tests/TPPDFTests/Image/PDFImage_Spec.swift @@ -35,7 +35,7 @@ class PDFImage_Spec: QuickSpec { context("initializer") { - it("can be initalized with only an image") { + it("can be initialized with only an image") { pdfImage = PDFImage(image: image) expect(pdfImage.image) == image expect(pdfImage.caption).to(beNil()) diff --git a/Tests/TPPDFTests/List/PDFListItemSymbol_Spec.swift b/Tests/TPPDFTests/List/PDFListItemSymbol_Spec.swift index 0b43cc9a..a1547b60 100644 --- a/Tests/TPPDFTests/List/PDFListItemSymbol_Spec.swift +++ b/Tests/TPPDFTests/List/PDFListItemSymbol_Spec.swift @@ -47,7 +47,7 @@ class PDFListItemSymbol_Spec : QuickSpec { expect(PDFListItemSymbol.numbered(value: nil).rawValue) == "numbered|nil" } - it("can be initalized with raw value") { + it("can be initialized with raw value") { expect(PDFListItemSymbol(rawValue: "none")?.rawValue) == PDFListItemSymbol.none.rawValue expect(PDFListItemSymbol(rawValue: "inherit")?.rawValue) == PDFListItemSymbol.inherit.rawValue expect(PDFListItemSymbol(rawValue: "dot")?.rawValue) == PDFListItemSymbol.dot.rawValue diff --git a/Tests/TPPDFTests/List/PDFListItem_Spec.swift b/Tests/TPPDFTests/List/PDFListItem_Spec.swift index 9265d776..45a4fd10 100644 --- a/Tests/TPPDFTests/List/PDFListItem_Spec.swift +++ b/Tests/TPPDFTests/List/PDFListItem_Spec.swift @@ -42,12 +42,12 @@ class PDFListItem_Spec: QuickSpec { describe("initializer") { - it("can be initalized with a symbol") { + it("can be initialized with a symbol") { object = PDFListItem(symbol: .dash) expect(object.symbol.rawValue) == PDFListItemSymbol.dash.rawValue } - it("can be initalized with a content") { + it("can be initialized with a content") { let content = "EXAMPLE" object = PDFListItem(content: content) diff --git a/Tests/TPPDFTests/Table/PDFTableCellBorders_Spec.swift b/Tests/TPPDFTests/Table/PDFTableCellBorders_Spec.swift index 1d1cfe54..b01a40b3 100644 --- a/Tests/TPPDFTests/Table/PDFTableCellBorders_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableCellBorders_Spec.swift @@ -36,30 +36,30 @@ class PDFTableCellBorders_Spec: QuickSpec { } } - context("initalizer") { + context("initializer") { - it("can be iniatlized with a left border") { + it("can be initialized with a left border") { let style = PDFLineStyle(type: .dotted, color: .orange, width: 10) let borders = PDFTableCellBorders(left: style) expect(borders.left) == style } - it("can be iniatlized with a top border") { + it("can be initialized with a top border") { let style = PDFLineStyle(type: .dotted, color: .orange, width: 10) let borders = PDFTableCellBorders(top: style) expect(borders.top) == style } - it("can be iniatlized with a right border") { + it("can be initialized with a right border") { let style = PDFLineStyle(type: .dotted, color: .orange, width: 10) let borders = PDFTableCellBorders(right: style) expect(borders.right) == style } - it("can be iniatlized with a bottom border") { + it("can be initialized with a bottom border") { let style = PDFLineStyle(type: .dotted, color: .orange, width: 10) let borders = PDFTableCellBorders(bottom: style) diff --git a/Tests/TPPDFTests/Table/PDFTableCellPosition_Spec.swift b/Tests/TPPDFTests/Table/PDFTableCellPosition_Spec.swift index 7d33c591..6ff96eee 100644 --- a/Tests/TPPDFTests/Table/PDFTableCellPosition_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableCellPosition_Spec.swift @@ -30,9 +30,9 @@ class PDFTableCellPosition_Spec: QuickSpec { } } - context("initalizer") { + context("initializer") { - it("can be initalized with a row and a column") { + it("can be initialized with a row and a column") { expect(position.row) == row expect(position.column) == column } diff --git a/Tests/TPPDFTests/Table/PDFTableCellStyle_Spec.swift b/Tests/TPPDFTests/Table/PDFTableCellStyle_Spec.swift index a10db06b..9a29e66c 100644 --- a/Tests/TPPDFTests/Table/PDFTableCellStyle_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableCellStyle_Spec.swift @@ -34,9 +34,9 @@ class PDFTableCellStyle_Spec: QuickSpec { } } - context("initalizer") { + context("initializer") { - it("can be iniatlized with colors") { + it("can be initialized with colors") { let colors = (fill: Color.orange, text: Color.green) let cell = PDFTableCellStyle(colors: colors) @@ -44,14 +44,14 @@ class PDFTableCellStyle_Spec: QuickSpec { expect(cell.colors.text) == Color.green } - it("can be iniatlized with borders") { + it("can be initialized with borders") { let borders = PDFTableCellBorders(left: PDFLineStyle(type: .dotted, color: .purple, width: 15)) let cell = PDFTableCellStyle(borders: borders) expect(cell.borders) == borders } - it("can be iniatlized with a font") { + it("can be initialized with a font") { let font = Font.systemFont(ofSize: 25) let cell = PDFTableCellStyle(font: font) diff --git a/Tests/TPPDFTests/Table/PDFTableCell_Spec.swift b/Tests/TPPDFTests/Table/PDFTableCell_Spec.swift index 29821dc6..f876bb07 100644 --- a/Tests/TPPDFTests/Table/PDFTableCell_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableCell_Spec.swift @@ -33,23 +33,23 @@ class PDFTableCell_Spec: QuickSpec { } } - context("initalizer") { + context("initializer") { - it("can be iniatlized with a content") { + it("can be initialized with a content") { let content = try! PDFTableContent(content: "EXAMPLE") let cell = PDFTableCell(content: content) expect(cell.content) == content } - it("can be iniatlized with an alignment") { + it("can be initialized with an alignment") { let alignment = PDFTableCellAlignment.bottomRight let cell = PDFTableCell(alignment: alignment) expect(cell.alignment) == alignment } - it("can be iniatlized with a style") { + it("can be initialized with a style") { let style = PDFTableCellStyle(colors: (fill: Color.blue, text: Color.green)) let cell = PDFTableCell(style: style) diff --git a/Tests/TPPDFTests/Table/PDFTableContent_Spec.swift b/Tests/TPPDFTests/Table/PDFTableContent_Spec.swift index 54d294dc..c6b065b2 100644 --- a/Tests/TPPDFTests/Table/PDFTableContent_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableContent_Spec.swift @@ -50,7 +50,7 @@ class PDFTableContent_Spec: QuickSpec { context("initializer") { - it("can be initalized with any") { + it("can be initialized with any") { expect { try PDFTableContent(content: 123) }.toNot(throwError()) @@ -59,7 +59,7 @@ class PDFTableContent_Spec: QuickSpec { }.to(throwError()) } - it("can be initalized with type and optional content") { + it("can be initialized with type and optional content") { let content = PDFTableContent(type: PDFTableContent.ContentType.attributedString, content: NSAttributedString(string: "EXAMPLE")) expect(content.type) == PDFTableContent.ContentType.attributedString diff --git a/Tests/TPPDFTests/Table/PDFTableStyle_Spec.swift b/Tests/TPPDFTests/Table/PDFTableStyle_Spec.swift index 102869e3..22a87500 100644 --- a/Tests/TPPDFTests/Table/PDFTableStyle_Spec.swift +++ b/Tests/TPPDFTests/Table/PDFTableStyle_Spec.swift @@ -57,9 +57,9 @@ class PDFTableStyle_Spec: QuickSpec { } } - context("initalizer") { + context("initializer") { - it("can be initalized with default values") { + it("can be initialized with default values") { let style = PDFTableStyle() expect(style.rowHeaderCount) == 1 @@ -73,7 +73,7 @@ class PDFTableStyle_Spec: QuickSpec { expect(style.alternatingContentStyle).to(beNil()) } - it("can be initalized with values") { + it("can be initialized with values") { let rowHeaderCount = 4 let columnHeaderCount = 4 let footerCount = 4 diff --git a/Tests/TPPDFTests/Text/PDFAttributedText_Spec.swift b/Tests/TPPDFTests/Text/PDFAttributedText_Spec.swift index 951f8fd9..0fc3cdb3 100644 --- a/Tests/TPPDFTests/Text/PDFAttributedText_Spec.swift +++ b/Tests/TPPDFTests/Text/PDFAttributedText_Spec.swift @@ -16,7 +16,7 @@ class PDFAttributedText_Spec: QuickSpec { override func spec() { describe("PDFAttributedText") { - it("can be initalized with an attributed string") { + it("can be initialized with an attributed string") { let attributed = NSAttributedString(string: "example") let textObject = PDFAttributedText(text: attributed) diff --git a/Tests/TPPDFTests/Text/PDFSimpleText_Spec.swift b/Tests/TPPDFTests/Text/PDFSimpleText_Spec.swift index 74813046..6444e44f 100644 --- a/Tests/TPPDFTests/Text/PDFSimpleText_Spec.swift +++ b/Tests/TPPDFTests/Text/PDFSimpleText_Spec.swift @@ -35,7 +35,7 @@ class PDFSimpleText_Spec: QuickSpec { } } - it("can be initalized without spacing") { + it("can be initialized without spacing") { let text = "STRING" textObject = PDFSimpleText(text: text)