From 72be076238e01d508128c25aa1363e373c580d9f Mon Sep 17 00:00:00 2001 From: samir Date: Mon, 14 Jul 2014 23:29:54 +0200 Subject: [PATCH] Use the ivar directly in initialization --- OHHTTPStubs/Sources/OHHTTPStubsResponse.m | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OHHTTPStubs/Sources/OHHTTPStubsResponse.m b/OHHTTPStubs/Sources/OHHTTPStubsResponse.m index 22c8cc7f..41610708 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubsResponse.m +++ b/OHHTTPStubs/Sources/OHHTTPStubsResponse.m @@ -88,14 +88,14 @@ +(instancetype)responseWithError:(NSError*)error -(instancetype)responseTime:(NSTimeInterval)responseTime { - self.responseTime = responseTime; + _responseTime = responseTime; return self; } -(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime { - self.requestTime = requestTime; - self.responseTime = responseTime; + _requestTime = requestTime; + _responseTime = responseTime; return self; } @@ -110,12 +110,12 @@ -(instancetype)initWithInputStream:(NSInputStream*)inputStream self = [super init]; if (self) { - self.inputStream = inputStream; - self.dataSize = dataSize; - self.statusCode = statusCode; + _inputStream = inputStream; + _dataSize = dataSize; + _statusCode = statusCode; NSMutableDictionary * headers = [NSMutableDictionary dictionaryWithDictionary:httpHeaders]; - headers[@"Content-Length"] = [NSString stringWithFormat:@"%llu",self.dataSize]; - self.httpHeaders = [NSDictionary dictionaryWithDictionary:headers]; + headers[@"Content-Length"] = [NSString stringWithFormat:@"%llu",_dataSize]; + _httpHeaders = [NSDictionary dictionaryWithDictionary:headers]; } return self; } @@ -150,7 +150,7 @@ -(instancetype)initWithError:(NSError*)error { self = [super init]; if (self) { - self.error = error; + _error = error; } return self; }