Make code formatting match current style.
This commit is contained in:
parent
cc458ecab7
commit
1a03bcf03c
|
@ -1,6 +1,6 @@
|
||||||
//
|
//
|
||||||
// DatabaseObject+Database.swift
|
// DatabaseObject+Database.swift
|
||||||
// Database
|
// NetNewsWire
|
||||||
//
|
//
|
||||||
// Created by Brent Simmons on 9/13/17.
|
// Created by Brent Simmons on 9/13/17.
|
||||||
// Copyright © 2017 Ranchero Software. All rights reserved.
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
||||||
|
@ -13,13 +13,11 @@ import Articles
|
||||||
extension Array where Element == DatabaseObject {
|
extension Array where Element == DatabaseObject {
|
||||||
|
|
||||||
func asAuthors() -> Set<Author>? {
|
func asAuthors() -> Set<Author>? {
|
||||||
|
|
||||||
let authors = Set(self.map { $0 as! Author })
|
let authors = Set(self.map { $0 as! Author })
|
||||||
return authors.isEmpty ? nil : authors
|
return authors.isEmpty ? nil : authors
|
||||||
}
|
}
|
||||||
|
|
||||||
func asAttachments() -> Set<Attachment>? {
|
func asAttachments() -> Set<Attachment>? {
|
||||||
|
|
||||||
let attachments = Set(self.map { $0 as! Attachment })
|
let attachments = Set(self.map { $0 as! Attachment })
|
||||||
return attachments.isEmpty ? nil : attachments
|
return attachments.isEmpty ? nil : attachments
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import Articles
|
||||||
extension RelatedObjectsMap {
|
extension RelatedObjectsMap {
|
||||||
|
|
||||||
func attachments(for articleID: String) -> Set<Attachment>? {
|
func attachments(for articleID: String) -> Set<Attachment>? {
|
||||||
|
|
||||||
if let objects = self[articleID] {
|
if let objects = self[articleID] {
|
||||||
return objects.asAttachments()
|
return objects.asAttachments()
|
||||||
}
|
}
|
||||||
|
@ -21,7 +20,6 @@ extension RelatedObjectsMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
func authors(for articleID: String) -> Set<Author>? {
|
func authors(for articleID: String) -> Set<Author>? {
|
||||||
|
|
||||||
if let objects = self[articleID] {
|
if let objects = self[articleID] {
|
||||||
return objects.asAuthors()
|
return objects.asAuthors()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue