Skip to content

Commit

Permalink
Replaced [self class] with self for class methods
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Nov 2, 2021
1 parent e934771 commit 40b7a64
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/ARTDeviceIdentityTokenDetails.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (NSData *)archive {
}

+ (ARTDeviceIdentityTokenDetails *)unarchive:(NSData *)data {
return [[self class] art_unarchiveFromData:data];
return [self art_unarchiveFromData:data];
}

@end
2 changes: 1 addition & 1 deletion Source/ARTPushActivationEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ - (NSData *)archive {
}

+ (ARTPushActivationEvent *)unarchive:(NSData *)data {
return [[self class] art_unarchiveFromData:data];
return [self art_unarchiveFromData:data];
}

@end
Expand Down
2 changes: 1 addition & 1 deletion Source/ARTPushActivationState.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (NSData *)archive {
}

+ (ARTPushActivationState *)unarchive:(NSData *)data {
return [[self class] art_unarchiveFromData:data];
return [self art_unarchiveFromData:data];
}

@end
Expand Down
4 changes: 2 additions & 2 deletions Source/ARTTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ - (nullable NSData *)art_archive {
}

+ (nullable id)art_unarchiveFromData:(NSData *)data {
NSSet* allowedTypes = [NSSet setWithArray:@[ [NSArray class], [NSDictionary class], [self class]]];
NSSet* allowedTypes = [NSSet setWithArray:@[ [NSArray class], [NSDictionary class], self]];
#if TARGET_OS_MACCATALYST
NSError *error;
id result = [NSKeyedUnarchiver unarchivedObjectOfClasses:allowedTypes fromData:data error:&error];
Expand All @@ -401,7 +401,7 @@ + (nullable id)art_unarchiveFromData:(NSData *)data {
NSError *error;
id result = [NSKeyedUnarchiver unarchivedObjectOfClasses:allowedTypes fromData:data error:&error];
if (error) {
NSLog(@"%@ unarchive failed: %@", [self class], error);
NSLog(@"%@ unarchive failed: %@", self, error);
}
return result;
}
Expand Down

0 comments on commit 40b7a64

Please sign in to comment.