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

@@ -95,7 +95,7 @@ extern NSString * const RKMappingTestExpectationErrorKey;
@param destinationObject The destionation object being to.
@return A new mapping test object for a mapping, a source object and a destination object.
*/
+ (RKMappingTest *)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject;
+ (instancetype)testForMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject;
/**
Initializes the receiver with a given object mapping, source object, and destination object.
@@ -105,7 +105,7 @@ extern NSString * const RKMappingTestExpectationErrorKey;
@param destinationObject The destionation object being to.
@return The receiver, initialized with mapping, sourceObject and destinationObject.
*/
- (id)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject;
- (instancetype)initWithMapping:(RKMapping *)mapping sourceObject:(id)sourceObject destinationObject:(id)destinationObject;
///----------------------------
/// @name Managing Expectations