Skip to content

Converted to Swift 3#11

Open
zirinisp wants to merge 1 commit intoTallwave:masterfrom
zirinisp:swift3
Open

Converted to Swift 3#11
zirinisp wants to merge 1 commit intoTallwave:masterfrom
zirinisp:swift3

Conversation

@zirinisp
Copy link

No description provided.

customFontName = config.textView[textStyle],
fontName = customFontName else { return }
let customFontName = config.textView[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.textView[textStyle],
fontName = customFontName else { return }
let customFontName = config.textView[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = textView.textStyle,
customFontName = config.textView[textStyle],
fontName = customFontName else { return }
let customFontName = config.textView[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = textView.textStyle,
customFontName = config.textView[textStyle],
fontName = customFontName else { return }
let customFontName = config.textView[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.textField[textStyle],
fontName = customFontName else { return }
let customFontName = config.textField[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.textField[textStyle],
fontName = customFontName else { return }
let customFontName = config.textField[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = textField.textStyle,
customFontName = config.textField[textStyle],
fontName = customFontName else { return }
let customFontName = config.textField[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = textField.textStyle,
customFontName = config.textField[textStyle],
fontName = customFontName else { return }
let customFontName = config.textField[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.label[textStyle],
fontName = customFontName else { return }
let customFontName = config.label[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.label[textStyle],
fontName = customFontName else { return }
let customFontName = config.label[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = label.textStyle,
customFontName = config.label[textStyle],
fontName = customFontName else { return }
let customFontName = config.label[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = label.textStyle,
customFontName = config.label[textStyle],
fontName = customFontName else { return }
let customFontName = config.label[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.button[textStyle],
fontName = customFontName else { return }
let customFontName = config.button[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

customFontName = config.button[textStyle],
fontName = customFontName else { return }
let customFontName = config.button[textStyle],
let fontName = customFontName else { return }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = button.textStyle,
customFontName = config.button[textStyle],
fontName = customFontName else { return }
let customFontName = config.button[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

guard let textStyle = button.textStyle,
customFontName = config.button[textStyle],
fontName = customFontName else { return }
let customFontName = config.button[textStyle],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)

var textStyle: String? {
return font?.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

var textStyle: String? {
return font?.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

var textStyle: String? {
return font?.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

var textStyle: String? {
return font?.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

let key = Util.dynamicTextAttribute
return titleLabel?.font.fontDescriptor().fontAttributes()[key] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = titleLabel?.font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 132 characters (line_length)

let key = Util.dynamicTextAttribute
return titleLabel?.font.fontDescriptor().fontAttributes()[key] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = titleLabel?.font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 132 characters (line_length)

var textStyle: String? {
return font.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

var textStyle: String? {
return font.fontDescriptor().fontAttributes()[Util.dynamicTextAttribute] as? String
var textStyle: UIFontTextStyle? {
guard let fontTextStyleString = font?.fontDescriptor.fontAttributes[Util.dynamicTextAttribute] as? String else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 120 characters (line_length)

- Parameter fontName: The name of the custom font to use.
*/
public func watchElement(view: UIView, fontKeyPath: String, textStyle: String, fontName: String) {
open func watchElement(_ view: UIView, fontKeyPath: String, textStyle: UIFontTextStyle, fontName: String) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 111 characters (line_length)

- Parameter fontName: The name of the custom font to use.
*/
public func watchElement(view: UIView, fontKeyPath: String, textStyle: String, fontName: String) {
open func watchElement(_ view: UIView, fontKeyPath: String, textStyle: UIFontTextStyle, fontName: String) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 111 characters (line_length)

- Parameter fontName: The name of the custom font to use.
*/
public func watchTextField(textField: UITextField, textStyle: String, fontName: String) {
open func watchTextField(_ textField: UITextField, textStyle: UIFontTextStyle, fontName: String) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)

- Parameter fontName: The name of the custom font to use.
*/
public func watchTextField(textField: UITextField, textStyle: String, fontName: String) {
open func watchTextField(_ textField: UITextField, textStyle: UIFontTextStyle, fontName: String) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)


/// Storage and lookup for the views `DynamicTypeManager` is tracking.
private var elementToTypeTable: NSMapTable = NSMapTable.weakToStrongObjectsMapTable()
fileprivate var elementToTypeTable: NSMapTable<AnyObject, AnyObject> = NSMapTable.weakToStrongObjects()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 107 characters (line_length)


/// Storage and lookup for the views `DynamicTypeManager` is tracking.
private var elementToTypeTable: NSMapTable = NSMapTable.weakToStrongObjectsMapTable()
fileprivate var elementToTypeTable: NSMapTable<AnyObject, AnyObject> = NSMapTable.weakToStrongObjects()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 107 characters (line_length)

- Parameter textStyle: The identifier to look up.
*/
func scaledFontSizeForStyle(textStyle: String) -> CGFloat? {
func scaledFontSizeForStyle(_ textStyle: UIFontTextStyle) -> CGFloat? {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid Docs Violation: Documented declarations should be valid. (valid_docs)

- Parameter textStyle: The identifier to look up.
*/
func scaledFontSizeForStyle(textStyle: String) -> CGFloat? {
func scaledFontSizeForStyle(_ textStyle: UIFontTextStyle) -> CGFloat? {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid Docs Violation: Documented declarations should be valid. (valid_docs)

@swilliams
Copy link
Contributor

Thanks for the PR! I want to be real intentional about implementing Swift 3, and I'm not sure if everything here is how to go about it. I also don't have a ton of time to devote to it, but fully intend to.

(Not so concerned about Hound or Travis errors either, they're way too finicky right now)

@jmbeneUF
Copy link

jmbeneUF commented Feb 6, 2017

Any news about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants