Use instancetype in constructors for increased subclassing friendliness

This commit is contained in:
Blake Watters
2012-12-22 14:54:49 -05:00
parent 929cd44bd7
commit b78deb3eed
47 changed files with 102 additions and 106 deletions

View File

@@ -31,7 +31,7 @@
@implementation RKPropertyMappingTestExpectation
+ (RKPropertyMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath
{
RKPropertyMappingTestExpectation *expectation = [self new];
expectation.sourceKeyPath = sourceKeyPath;
@@ -40,7 +40,7 @@
return expectation;
}
+ (RKPropertyMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value
{
RKPropertyMappingTestExpectation *expectation = [self new];
expectation.sourceKeyPath = sourceKeyPath;
@@ -50,7 +50,7 @@
return expectation;
}
+ (RKPropertyMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlock
{
RKPropertyMappingTestExpectation *expectation = [self new];
expectation.sourceKeyPath = sourceKeyPath;
@@ -60,7 +60,7 @@
return expectation;
}
+ (RKPropertyMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mapping
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mapping
{
RKPropertyMappingTestExpectation *expectation = [self new];
expectation.sourceKeyPath = sourceKeyPath;