Skip to content

Commit d50a796

Browse files
committed
Requested changes
1 parent 6425b9b commit d50a796

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Sources/ParseSwift/Types/ParseError.swift

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ extension Error {
419419
}
420420
~~~
421421
- parameter errorCode: A `ParseError` code to compare to.
422+
423+
- returns: A boolean indicating wheter or not the `Error` is the `errorCode`
422424
*/
423425
public func equalsTo(_ errorCode: ParseError.Code) -> Bool {
424426
guard let error = self as? ParseError else {
@@ -441,7 +443,8 @@ extension Error {
441443
- returns: An optional `ParseError`
442444
*/
443445
public func equalsTo(_ errorCode: ParseError.Code) -> ParseError? {
444-
guard let error = self as? ParseError, error.code == errorCode else {
446+
guard let error = self as? ParseError,
447+
error.code == errorCode else {
445448
return nil
446449
}
447450
return error
@@ -457,6 +460,8 @@ extension Error {
457460
}
458461
~~~
459462
- parameter errorCodes: A variadic amount of zero or more of `ParseError` codes to compare to.
463+
464+
- returns: A boolean indicating wheter or not the `Error` is contained in the `errorCodes`
460465
*/
461466
public func containedIn(_ errorCodes: ParseError.Code...) -> Bool {
462467
guard let error = self as? ParseError else {
@@ -479,7 +484,8 @@ extension Error {
479484
- returns: An optional `ParseError`
480485
*/
481486
public func containedIn(_ errorCodes: ParseError.Code...) -> ParseError? {
482-
guard let error = self as? ParseError, errorCodes.contains(error.code) == true else {
487+
guard let error = self as? ParseError,
488+
errorCodes.contains(error.code) == true else {
483489
return nil
484490
}
485491
return error
@@ -494,7 +500,9 @@ extension Error {
494500
//Do stuff
495501
}
496502
~~~
497-
- parameter errorCodes: A variadic amount of zero or more of `ParseError` codes to compare to.
503+
- parameter errorCodes: An array of zero or more of `ParseError` codes to compare to.
504+
505+
- returns: A boolean indicating wheter or not the `Error` is contained in the `errorCodes`
498506
*/
499507
public func containedIn(_ errorCodes: [ParseError.Code]) -> Bool {
500508
guard let error = self as? ParseError else {
@@ -512,12 +520,13 @@ extension Error {
512520
print(parseError.description)
513521
}
514522
~~~
515-
- parameter errorCodes: A variadic amount of zero or more of `ParseError` codes to compare to.
523+
- parameter errorCodes: An array of zero or more of `ParseError` codes to compare to.
516524

517525
- returns: An optional `ParseError`
518526
*/
519527
public func containedIn(_ errorCodes: [ParseError.Code]) -> ParseError? {
520-
guard let error = self as? ParseError, errorCodes.contains(error.code) == true else {
528+
guard let error = self as? ParseError,
529+
errorCodes.contains(error.code) == true else {
521530
return nil
522531
}
523532
return error

0 commit comments

Comments
 (0)