diff --git a/Code/CoreData/NSEntityDescription+RKAdditions.m b/Code/CoreData/NSEntityDescription+RKAdditions.m index ce87a084..d8d9cc9c 100644 --- a/Code/CoreData/NSEntityDescription+RKAdditions.m +++ b/Code/CoreData/NSEntityDescription+RKAdditions.m @@ -45,7 +45,7 @@ static char primaryKeyAttributeNameKey, primaryKeyPredicateKey; - (NSString *)primaryKeyAttributeName { // Check for an associative object reference - NSString *primaryKeyAttribute = (NSString *) objc_getAssociatedObject(self, &primaryKeyAttributeNameKey); + NSString *primaryKeyAttribute = (NSString *)objc_getAssociatedObject(self, &primaryKeyAttributeNameKey); // Fall back to the userInfo dictionary if (! primaryKeyAttribute) { @@ -71,7 +71,7 @@ static char primaryKeyAttributeNameKey, primaryKeyPredicateKey; - (NSPredicate *)predicateForPrimaryKeyAttribute { - return (NSPredicate *) objc_getAssociatedObject(self, &primaryKeyPredicateKey); + return (NSPredicate *)objc_getAssociatedObject(self, &primaryKeyPredicateKey); } - (id)coerceValueForPrimaryKey:(id)primaryKeyValue diff --git a/Code/CoreData/NSManagedObject+ActiveRecord.h b/Code/CoreData/NSManagedObject+ActiveRecord.h index 8477cec7..cf8936fa 100644 --- a/Code/CoreData/NSManagedObject+ActiveRecord.h +++ b/Code/CoreData/NSManagedObject+ActiveRecord.h @@ -152,8 +152,8 @@ + (NSNumber *)numberOfEntitiesWithPredicate:(NSPredicate *)searchTerm; + (NSNumber *)numberOfEntitiesWithPredicate:(NSPredicate *)searchTerm inContext:(NSManagedObjectContext *)context; -+ (BOOL) hasAtLeastOneEntity; -+ (BOOL) hasAtLeastOneEntityInContext:(NSManagedObjectContext *)context; ++ (BOOL)hasAtLeastOneEntity; ++ (BOOL)hasAtLeastOneEntityInContext:(NSManagedObjectContext *)context; + (NSFetchRequest *)requestAll; + (NSFetchRequest *)requestAllInContext:(NSManagedObjectContext *)context; @@ -180,8 +180,8 @@ + (NSArray *)findAllWithPredicate:(NSPredicate *)searchTerm inContext:(NSManagedObjectContext *)context; + (NSNumber *)maxValueFor:(NSString *)property; -+ (id) objectWithMinValueFor:(NSString *)property; -+ (id) objectWithMinValueFor:(NSString *)property inContext:(NSManagedObjectContext *)context; ++ (id)objectWithMinValueFor:(NSString *)property; ++ (id)objectWithMinValueFor:(NSString *)property inContext:(NSManagedObjectContext *)context; + (id)findFirst; + (id)findFirstInContext:(NSManagedObjectContext *)context; diff --git a/Code/CoreData/NSManagedObject+ActiveRecord.m b/Code/CoreData/NSManagedObject+ActiveRecord.m index 85f700aa..e774324a 100644 --- a/Code/CoreData/NSManagedObject+ActiveRecord.m +++ b/Code/CoreData/NSManagedObject+ActiveRecord.m @@ -311,7 +311,7 @@ RK_FIX_CATEGORY_BUG(NSManagedObject_ActiveRecord) id attributeName; va_list variadicArguments; va_start(variadicArguments, attributesToSortBy); - while ((attributeName = va_arg(variadicArguments, id))!= nil) + while ((attributeName = va_arg(variadicArguments, id)) != nil) { NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:attributeName ascending:ascending]; [attributes addObject:sortDescriptor]; @@ -324,7 +324,7 @@ RK_FIX_CATEGORY_BUG(NSManagedObject_ActiveRecord) { va_list variadicArguments; va_start(variadicArguments, attributesToSortBy); - [attributes addObject:[[[NSSortDescriptor alloc] initWithKey:attributesToSortBy ascending:ascending] autorelease] ]; + [attributes addObject:[[[NSSortDescriptor alloc] initWithKey:attributesToSortBy ascending:ascending] autorelease]]; va_end(variadicArguments); } diff --git a/Code/CoreData/NSManagedObjectContext+RKAdditions.m b/Code/CoreData/NSManagedObjectContext+RKAdditions.m index f838cd1d..81bffff5 100644 --- a/Code/CoreData/NSManagedObjectContext+RKAdditions.m +++ b/Code/CoreData/NSManagedObjectContext+RKAdditions.m @@ -15,7 +15,7 @@ static char NSManagedObject_RKManagedObjectStoreAssociatedKey; - (RKManagedObjectStore *)managedObjectStore { - return (RKManagedObjectStore *) objc_getAssociatedObject(self, &NSManagedObject_RKManagedObjectStoreAssociatedKey); + return (RKManagedObjectStore *)objc_getAssociatedObject(self, &NSManagedObject_RKManagedObjectStoreAssociatedKey); } - (void)setManagedObjectStore:(RKManagedObjectStore *)managedObjectStore diff --git a/Code/CoreData/RKInMemoryManagedObjectCache.m b/Code/CoreData/RKInMemoryManagedObjectCache.m index 01d59326..e73f590d 100644 --- a/Code/CoreData/RKInMemoryManagedObjectCache.m +++ b/Code/CoreData/RKInMemoryManagedObjectCache.m @@ -50,7 +50,7 @@ static NSString * const RKInMemoryObjectManagedObjectCacheThreadDictionaryKey = RKLogInfo(@"Caching instances of Entity '%@' by primary key attribute '%@'", entity.name, primaryKeyAttribute); [entityCache cacheObjectsForEntity:entity byAttribute:primaryKeyAttribute]; RKEntityByAttributeCache *attributeCache = [entityCache attributeCacheForEntity:entity attribute:primaryKeyAttribute]; - RKLogTrace(@"Cached %ld objects", (long) [attributeCache count]); + RKLogTrace(@"Cached %ld objects", (long)[attributeCache count]); } return [entityCache objectForEntity:entity withAttribute:primaryKeyAttribute value:primaryKeyValue]; diff --git a/Code/CoreData/RKManagedObjectMappingOperation.m b/Code/CoreData/RKManagedObjectMappingOperation.m index 3ee74470..c9ad3385 100644 --- a/Code/CoreData/RKManagedObjectMappingOperation.m +++ b/Code/CoreData/RKManagedObjectMappingOperation.m @@ -59,7 +59,7 @@ RKLogWarning(@"Can only connect relationships for RKObjectMapping relationships. Found %@: Skipping...", NSStringFromClass([mapping class])); return; } - RKManagedObjectMapping *objectMapping = (RKManagedObjectMapping *) mapping; + RKManagedObjectMapping *objectMapping = (RKManagedObjectMapping *)mapping; NSAssert(relationshipMapping, @"Unable to find relationship mapping '%@' to connect by primaryKey", relationshipName); NSAssert([relationshipMapping isKindOfClass:[RKObjectRelationshipMapping class]], @"Expected mapping for %@ to be a relationship mapping", relationshipName); NSAssert([relationshipMapping.mapping isKindOfClass:[RKManagedObjectMapping class]], @"Can only connect RKManagedObjectMapping relationships"); diff --git a/Code/CoreData/RKManagedObjectSeeder.m b/Code/CoreData/RKManagedObjectSeeder.m index e8af3400..3b23cdd7 100644 --- a/Code/CoreData/RKManagedObjectSeeder.m +++ b/Code/CoreData/RKManagedObjectSeeder.m @@ -163,7 +163,7 @@ NSString * const RKDefaultSeedDatabaseFileName = @"RKSeedDatabase.sqlite"; } } - RKLogInfo(@"Seeded %lu objects from %@...", (unsigned long) [mappedObjects count], [NSString stringWithFormat:@"%@", fileName]); + RKLogInfo(@"Seeded %lu objects from %@...", (unsigned long)[mappedObjects count], [NSString stringWithFormat:@"%@", fileName]); } else { RKLogError(@"Unable to read file %@: %@", fileName, [error localizedDescription]); } diff --git a/Code/CoreData/RKManagedObjectThreadSafeInvocation.m b/Code/CoreData/RKManagedObjectThreadSafeInvocation.m index 3193bdf9..d4012166 100644 --- a/Code/CoreData/RKManagedObjectThreadSafeInvocation.m +++ b/Code/CoreData/RKManagedObjectThreadSafeInvocation.m @@ -26,7 +26,7 @@ + (RKManagedObjectThreadSafeInvocation *)invocationWithMethodSignature:(NSMethodSignature *)methodSignature { - return (RKManagedObjectThreadSafeInvocation *) [super invocationWithMethodSignature:methodSignature]; + return (RKManagedObjectThreadSafeInvocation *)[super invocationWithMethodSignature:methodSignature]; } - (void)setManagedObjectKeyPaths:(NSSet *)keyPaths forArgument:(NSInteger)index diff --git a/Code/Network/NSData+RKAdditions.m b/Code/Network/NSData+RKAdditions.m index 3d7327ff..7011d38b 100644 --- a/Code/Network/NSData+RKAdditions.m +++ b/Code/Network/NSData+RKAdditions.m @@ -32,7 +32,7 @@ RK_FIX_CATEGORY_BUG(NSData_RKAdditions) unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH]; // Create 16 byte MD5 hash value, store in buffer - CC_MD5(self.bytes, (CC_LONG) self.length, md5Buffer); + CC_MD5(self.bytes, (CC_LONG)self.length, md5Buffer); // Convert unsigned char buffer to NSString of hex values NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH *2]; diff --git a/Code/Network/RKClient.m b/Code/Network/RKClient.m index fb018bec..d6b3d2b5 100644 --- a/Code/Network/RKClient.m +++ b/Code/Network/RKClient.m @@ -431,7 +431,7 @@ NSString *RKPathAppendQueryParams(NSString *resourcePath, NSDictionary *queryPar - (void)reachabilityWasDetermined:(NSNotification *)notification { - RKReachabilityObserver *observer = (RKReachabilityObserver *) [notification object]; + RKReachabilityObserver *observer = (RKReachabilityObserver *)[notification object]; NSAssert(observer == self.reachabilityObserver, @"Received unexpected reachability notification from inappropriate reachability observer"); RKLogDebug(@"Reachability to host '%@' determined for client %@, unsuspending queue %@", observer.host, self, self.requestQueue); diff --git a/Code/Network/RKOAuthClient.m b/Code/Network/RKOAuthClient.m index d0b2073e..d70f64a5 100644 --- a/Code/Network/RKOAuthClient.m +++ b/Code/Network/RKOAuthClient.m @@ -79,7 +79,7 @@ //Use the parsedBody answer in NSDictionary - NSDictionary *oauthResponse = (NSDictionary *) [response parsedBody:&error]; + NSDictionary *oauthResponse = (NSDictionary *)[response parsedBody:&error]; if ([oauthResponse isKindOfClass:[NSDictionary class]]) { //Check the if an access token comes in the response diff --git a/Code/Network/RKParamsAttachment.m b/Code/Network/RKParamsAttachment.m index 283c4473..2bdea86e 100644 --- a/Code/Network/RKParamsAttachment.m +++ b/Code/Network/RKParamsAttachment.m @@ -203,13 +203,13 @@ extern NSString * const kRKStringBoundary; if (_delivered >= (_length - 2) && sent < maxLength) { if (_delivered == (_length - 2)) { *(buffer + sent) = '\r'; - sent ++; - _delivered ++; + sent++; + _delivered++; } *(buffer + sent) = '\n'; - sent ++; - _delivered ++; + sent++; + _delivered++; } return sent; diff --git a/Code/Network/RKReachabilityObserver.m b/Code/Network/RKReachabilityObserver.m index 46281c12..bff4f733 100755 --- a/Code/Network/RKReachabilityObserver.m +++ b/Code/Network/RKReachabilityObserver.m @@ -50,7 +50,7 @@ NSString * const RKReachabilityWasDeterminedNotification = @"RKReachabilityWasDe static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - RKReachabilityObserver *observer = (RKReachabilityObserver *) info; + RKReachabilityObserver *observer = (RKReachabilityObserver *)info; observer.reachabilityFlags = flags; [pool release]; @@ -140,7 +140,7 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach { // Determine if the string contains a hostname or IP address struct sockaddr_in sa; - char *hostNameOrIPAddressCString = (char *) [hostNameOrIPAddress UTF8String]; + char *hostNameOrIPAddressCString = (char *)[hostNameOrIPAddress UTF8String]; int result = inet_pton(AF_INET, hostNameOrIPAddressCString, &(sa.sin_addr)); if (result != 0) { // IP Address @@ -151,7 +151,7 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach remote_saddr.sin_family = AF_INET; inet_aton(hostNameOrIPAddressCString, &(remote_saddr.sin_addr)); - return [self initWithAddress:(struct sockaddr *) &remote_saddr]; + return [self initWithAddress:(struct sockaddr *)&remote_saddr]; } // Hostname diff --git a/Code/Network/RKRequest.m b/Code/Network/RKRequest.m index 02b49f2e..2f2e617f 100644 --- a/Code/Network/RKRequest.m +++ b/Code/Network/RKRequest.m @@ -686,7 +686,7 @@ RKRequestMethod RKRequestMethodTypeFromName(NSString *methodName) { self.loading = NO; self.loaded = YES; - RKLogInfo(@"Status Code: %ld", (long) [response statusCode]); + RKLogInfo(@"Status Code: %ld", (long)[response statusCode]); RKLogDebug(@"Body: %@", [response bodyAsString]); self.response = response; diff --git a/Code/Network/RKRequestQueue.m b/Code/Network/RKRequestQueue.m index 95428cde..e227389c 100644 --- a/Code/Network/RKRequestQueue.m +++ b/Code/Network/RKRequestQueue.m @@ -100,7 +100,7 @@ static const NSTimeInterval kFlushDelay = 0.3; NSArray *requestQueueInstances = [RKRequestQueueInstances copy]; RKRequestQueue *namedQueue = nil; for (NSValue *value in requestQueueInstances) { - RKRequestQueue *queue = (RKRequestQueue *) [value nonretainedObjectValue]; + RKRequestQueue *queue = (RKRequestQueue *)[value nonretainedObjectValue]; if ([queue.name isEqualToString:name]) { namedQueue = queue; break; @@ -123,7 +123,7 @@ static const NSTimeInterval kFlushDelay = 0.3; if (RKRequestQueueInstances) { NSArray *requestQueueInstances = [RKRequestQueueInstances copy]; for (NSValue *value in requestQueueInstances) { - RKRequestQueue *queue = (RKRequestQueue *) [value nonretainedObjectValue]; + RKRequestQueue *queue = (RKRequestQueue *)[value nonretainedObjectValue]; if ([queue.name isEqualToString:name]) { queueExists = YES; break; @@ -166,7 +166,7 @@ static const NSTimeInterval kFlushDelay = 0.3; { if (self.name) { for (NSValue *value in RKRequestQueueInstances) { - RKRequestQueue *queue = (RKRequestQueue *) [value nonretainedObjectValue]; + RKRequestQueue *queue = (RKRequestQueue *)[value nonretainedObjectValue]; if ([queue.name isEqualToString:self.name]) { [RKRequestQueueInstances removeObject:value]; return; @@ -227,7 +227,7 @@ static const NSTimeInterval kFlushDelay = 0.3; @synchronized(self) { [_loadingRequests addObject:request]; } - RKLogTrace(@"Loading count now %ld for queue %@", (long) self.loadingCount, self); + RKLogTrace(@"Loading count now %ld for queue %@", (long)self.loadingCount, self); } - (void)removeLoadingRequest:(RKRequest *)request @@ -249,7 +249,7 @@ static const NSTimeInterval kFlushDelay = 0.3; @synchronized(self) { [_loadingRequests removeObject:request]; } - RKLogTrace(@"Loading count now %ld for queue %@", (long) self.loadingCount, self); + RKLogTrace(@"Loading count now %ld for queue %@", (long)self.loadingCount, self); } - (void)loadNextInQueueDelayed @@ -306,7 +306,7 @@ static const NSTimeInterval kFlushDelay = 0.3; } [self addLoadingRequest:request]; - RKLogDebug(@"Sent request %@ from queue %@. Loading count = %ld of %ld", request, self, (long) self.loadingCount, (long) _concurrentRequestsLimit); + RKLogDebug(@"Sent request %@ from queue %@. Loading count = %ld of %ld", request, self, (long)self.loadingCount, (long)_concurrentRequestsLimit); [request sendAsynchronously]; if ([_delegate respondsToSelector:@selector(requestQueue:didSendRequest:)]) { @@ -498,7 +498,7 @@ static const NSTimeInterval kFlushDelay = 0.3; NSDictionary *userInfo = [notification userInfo]; // We successfully loaded a response - RKLogDebug(@"Received response for request %@, removing from queue. (Now loading %ld of %ld)", request, (long) self.loadingCount, (long) _concurrentRequestsLimit); + RKLogDebug(@"Received response for request %@, removing from queue. (Now loading %ld of %ld)", request, (long)self.loadingCount, (long)_concurrentRequestsLimit); RKResponse *response = [userInfo objectForKey:RKRequestDidLoadResponseNotificationUserInfoResponseKey]; if ([_delegate respondsToSelector:@selector(requestQueue:didLoadResponse:)]) { @@ -522,7 +522,7 @@ static const NSTimeInterval kFlushDelay = 0.3; if (userInfo) { error = [userInfo objectForKey:RKRequestDidFailWithErrorNotificationUserInfoErrorKey]; RKLogDebug(@"Request %@ failed loading in queue %@ with error: %@.(Now loading %ld of %ld)", request, self, - [error localizedDescription], (long) self.loadingCount, (long) _concurrentRequestsLimit); + [error localizedDescription], (long)self.loadingCount, (long)_concurrentRequestsLimit); } else { RKLogWarning(@"Received RKRequestDidFailWithErrorNotification without a userInfo, something is amiss..."); } diff --git a/Code/Network/RKResponse.m b/Code/Network/RKResponse.m index f38ae374..d2aa2682 100644 --- a/Code/Network/RKResponse.m +++ b/Code/Network/RKResponse.m @@ -116,7 +116,7 @@ return __VA_ARGS__; if (_request.disableCertificateValidation) { proceed = YES; - } else if ([_request.additionalRootCertificates count] > 0 ) { + } else if ([_request.additionalRootCertificates count] > 0) { CFArrayRef rootCerts = (CFArrayRef)[_request.additionalRootCertificates allObjects]; SecTrustResultType result; OSStatus returnCode; @@ -164,7 +164,7 @@ return __VA_ARGS__; [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge]; } else { - RKLogWarning(@"Failed authentication challenge after %ld failures", (long) [challenge previousFailureCount]); + RKLogWarning(@"Failed authentication challenge after %ld failures", (long)[challenge previousFailureCount]); [[challenge sender] cancelAuthenticationChallenge:challenge]; } } @@ -216,7 +216,7 @@ return __VA_ARGS__; - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse *)response { RKResponseIgnoreDelegateIfCancelled(); - RKLogDebug(@"NSHTTPURLResponse Status Code: %ld", (long) [response statusCode]); + RKLogDebug(@"NSHTTPURLResponse Status Code: %ld", (long)[response statusCode]); RKLogDebug(@"Headers: %@", [response allHeaderFields]); _httpURLResponse = [response retain]; [_request invalidateTimeoutTimer]; @@ -283,7 +283,7 @@ return __VA_ARGS__; CFStringEncoding cfEncoding = kCFStringEncodingInvalidId; NSString *textEncodingName = [self bodyEncodingName]; if (textEncodingName) { - cfEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef) textEncodingName); + cfEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)textEncodingName); } return (cfEncoding == kCFStringEncodingInvalidId) ? self.request.defaultHTTPEncoding : CFStringConvertEncodingToNSStringEncoding(cfEncoding); } diff --git a/Code/ObjectMapping/RKObjectLoader.m b/Code/ObjectMapping/RKObjectLoader.m index 9fe4b692..c51dfe2c 100644 --- a/Code/ObjectMapping/RKObjectLoader.m +++ b/Code/ObjectMapping/RKObjectLoader.m @@ -326,7 +326,7 @@ return NO; } else if (NO == [self canParseMIMEType:[self.response MIMEType]]) { // We can't parse the response, it's unmappable regardless of the status code - RKLogWarning(@"Encountered unexpected response with status code: %ld (MIME Type: %@ -> URL: %@)", (long) self.response.statusCode, self.response.MIMEType, self.URL); + RKLogWarning(@"Encountered unexpected response with status code: %ld (MIME Type: %@ -> URL: %@)", (long)self.response.statusCode, self.response.MIMEType, self.URL); NSError *error = [NSError errorWithDomain:RKErrorDomain code:RKObjectLoaderUnexpectedResponseError userInfo:nil]; if ([_delegate respondsToSelector:@selector(objectLoaderDidLoadUnexpectedResponse:)]) { [(NSObject*)_delegate objectLoaderDidLoadUnexpectedResponse:self]; diff --git a/Code/ObjectMapping/RKObjectMapper.m b/Code/ObjectMapping/RKObjectMapper.m index 7870054a..582cb951 100644 --- a/Code/ObjectMapping/RKObjectMapper.m +++ b/Code/ObjectMapping/RKObjectMapper.m @@ -91,7 +91,7 @@ { NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: errorMessage, NSLocalizedDescriptionKey, - @"RKObjectMapperKeyPath", keyPath ? keyPath : (NSString *) [NSNull null], + @"RKObjectMapperKeyPath", keyPath ? keyPath : (NSString *)[NSNull null], nil]; [userInfo addEntriesFromDictionary:otherInfo]; NSError *error = [NSError errorWithDomain:RKErrorDomain code:errorCode userInfo:userInfo]; diff --git a/Code/ObjectMapping/RKObjectMappingProvider.m b/Code/ObjectMapping/RKObjectMappingProvider.m index 59d7ed90..98329f73 100644 --- a/Code/ObjectMapping/RKObjectMappingProvider.m +++ b/Code/ObjectMapping/RKObjectMappingProvider.m @@ -87,12 +87,12 @@ - (RKObjectMapping *)serializationMappingForClass:(Class)objectClass { - return (RKObjectMapping *) [self mappingForKeyPath:NSStringFromClass(objectClass) context:RKObjectMappingProviderContextSerialization]; + return (RKObjectMapping *)[self mappingForKeyPath:NSStringFromClass(objectClass) context:RKObjectMappingProviderContextSerialization]; } - (NSDictionary *)objectMappingsByKeyPath { - return [NSDictionary dictionaryWithDictionary:(NSDictionary *) [self valueForContext:RKObjectMappingProviderContextObjectsByKeyPath]]; + return [NSDictionary dictionaryWithDictionary:(NSDictionary *)[self valueForContext:RKObjectMappingProviderContextObjectsByKeyPath]]; } - (void)registerObjectMapping:(RKObjectMapping *)objectMapping withRootKeyPath:(NSString *)keyPath @@ -117,7 +117,7 @@ NSArray *mappingByKeyPath = [[self valueForContext:RKObjectMappingProviderContextObjectsByKeyPath] allValues]; NSArray *mappingsToSearch = [[NSArray arrayWithArray:mappingByType] arrayByAddingObjectsFromArray:mappingByKeyPath]; for (RKObjectMappingDefinition *candidateMapping in mappingsToSearch) { - if ( ![candidateMapping respondsToSelector:@selector(objectClass)] || [mappings containsObject:candidateMapping]) + if (![candidateMapping respondsToSelector:@selector(objectClass)] || [mappings containsObject:candidateMapping]) continue; Class mappedClass = [candidateMapping performSelector:@selector(objectClass)]; if (mappedClass && [NSStringFromClass(mappedClass) isEqualToString:NSStringFromClass(theClass)]) { @@ -137,7 +137,7 @@ - (RKObjectMapping *)errorMapping { - return (RKObjectMapping *) [self mappingForContext:RKObjectMappingProviderContextErrors]; + return (RKObjectMapping *)[self mappingForContext:RKObjectMappingProviderContextErrors]; } - (void)setErrorMapping:(RKObjectMapping *)errorMapping @@ -151,7 +151,7 @@ - (RKObjectMapping *)paginationMapping { - return (RKObjectMapping *) [self mappingForContext:RKObjectMappingProviderContextPagination]; + return (RKObjectMapping *)[self mappingForContext:RKObjectMappingProviderContextPagination]; } - (void)setPaginationMapping:(RKObjectMapping *)paginationMapping @@ -351,7 +351,7 @@ - (RKObjectMapping *)mappingForKeyPath:(NSString *)keyPath { - return (RKObjectMapping *) [self objectMappingForKeyPath:keyPath]; + return (RKObjectMapping *)[self objectMappingForKeyPath:keyPath]; } - (void)setMapping:(RKObjectMapping *)mapping forKeyPath:(NSString *)keyPath diff --git a/Code/ObjectMapping/RKObjectMappingResult.m b/Code/ObjectMapping/RKObjectMappingResult.m index de14dca1..b4924939 100644 --- a/Code/ObjectMapping/RKObjectMappingResult.m +++ b/Code/ObjectMapping/RKObjectMappingResult.m @@ -75,7 +75,7 @@ return nil; } - if (count > 1) RKLogWarning(@"Coerced object mapping result containing %lu objects into singular result.", (unsigned long) count); + if (count > 1) RKLogWarning(@"Coerced object mapping result containing %lu objects into singular result.", (unsigned long)count); return [collection objectAtIndex:0]; } diff --git a/Code/ObjectMapping/RKObjectPaginator.m b/Code/ObjectMapping/RKObjectPaginator.m index 46dc6c85..892d9b73 100644 --- a/Code/ObjectMapping/RKObjectPaginator.m +++ b/Code/ObjectMapping/RKObjectPaginator.m @@ -191,7 +191,7 @@ static NSUInteger RKObjectPaginatorDefaultPerPage = 25; } else if (self.perPage && [self hasObjectCount]) { float objectCountFloat = self.objectCount; pageCount = ceilf(objectCountFloat / self.perPage); - RKLogInfo(@"Paginator objectCount: %ld pageCount: %ld", (long) self.objectCount, (long) self.pageCount); + RKLogInfo(@"Paginator objectCount: %ld pageCount: %ld", (long)self.objectCount, (long)self.pageCount); } else { NSAssert(NO, @"Paginator perPage set is 0."); RKLogError(@"Paginator perPage set is 0."); diff --git a/Code/ObjectMapping/RKObjectRelationshipMapping.m b/Code/ObjectMapping/RKObjectRelationshipMapping.m index d4cf1dee..f9ed9328 100644 --- a/Code/ObjectMapping/RKObjectRelationshipMapping.m +++ b/Code/ObjectMapping/RKObjectRelationshipMapping.m @@ -27,7 +27,7 @@ + (RKObjectRelationshipMapping *)mappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKObjectMappingDefinition *)objectOrDynamicMapping reversible:(BOOL)reversible { - RKObjectRelationshipMapping *relationshipMapping = (RKObjectRelationshipMapping *) [self mappingFromKeyPath:sourceKeyPath toKeyPath:destinationKeyPath]; + RKObjectRelationshipMapping *relationshipMapping = (RKObjectRelationshipMapping *)[self mappingFromKeyPath:sourceKeyPath toKeyPath:destinationKeyPath]; relationshipMapping.reversible = reversible; relationshipMapping.mapping = objectOrDynamicMapping; return relationshipMapping; diff --git a/Code/Support/NSDictionary+RKAdditions.m b/Code/Support/NSDictionary+RKAdditions.m index 3687cfdd..84daab2d 100644 --- a/Code/Support/NSDictionary+RKAdditions.m +++ b/Code/Support/NSDictionary+RKAdditions.m @@ -87,7 +87,7 @@ RK_FIX_CATEGORY_BUG(NSDictionary_RKAdditions) - (void)URLEncodePart:(NSMutableArray *)parts path:(NSString *)path value:(id)value { NSString *encodedPart = [[value description] stringByAddingURLEncoding]; - [parts addObject:[NSString stringWithFormat: @"%@=%@", path, encodedPart]]; + [parts addObject:[NSString stringWithFormat:@"%@=%@", path, encodedPart]]; } - (void)URLEncodeParts:(NSMutableArray *)parts path:(NSString *)inPath diff --git a/Code/Support/NSString+RKAdditions.m b/Code/Support/NSString+RKAdditions.m index 5011720d..3b1fcada 100644 --- a/Code/Support/NSString+RKAdditions.m +++ b/Code/Support/NSString+RKAdditions.m @@ -155,7 +155,7 @@ RK_FIX_CATEGORY_BUG(NSString_RKAdditions) - (NSString *)MIMETypeForPathExtension { NSString *fileExtension = [self pathExtension]; - CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (CFStringRef) fileExtension, NULL); + CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (CFStringRef)fileExtension, NULL); if (uti != NULL) { CFStringRef mime = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType); CFRelease(uti); @@ -173,7 +173,7 @@ RK_FIX_CATEGORY_BUG(NSString_RKAdditions) - (BOOL)isIPAddress { struct sockaddr_in sa; - char *hostNameOrIPAddressCString = (char *) [self UTF8String]; + char *hostNameOrIPAddressCString = (char *)[self UTF8String]; int result = inet_pton(AF_INET, hostNameOrIPAddressCString, &(sa.sin_addr)); return (result != 0); } @@ -194,7 +194,7 @@ RK_FIX_CATEGORY_BUG(NSString_RKAdditions) unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH]; // Create 16 byte MD5 hash value, store in buffer - CC_MD5(ptr, (CC_LONG) strlen(ptr), md5Buffer); + CC_MD5(ptr, (CC_LONG)strlen(ptr), md5Buffer); // Convert MD5 value in the buffer to NSString of hex values NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH *2]; diff --git a/Code/Support/RKLog.m b/Code/Support/RKLog.m index 91b8a588..b58b209c 100644 --- a/Code/Support/RKLog.m +++ b/Code/Support/RKLog.m @@ -165,7 +165,7 @@ void RKLogIntegerAsBinary(NSUInteger bitMask) { NSMutableString *string = [NSMutableString string]; do { [string appendString:(((NSUInteger)bitMask & bit) ? @"1" : @"0")]; - } while ( bit >>= 1 ); + } while (bit >>= 1); - NSLog(@"Value of %ld in binary: %@", (long) bitMask, string); + NSLog(@"Value of %ld in binary: %@", (long)bitMask, string); } diff --git a/Code/Support/RKPathMatcher.h b/Code/Support/RKPathMatcher.h index a32d0d7d..c79e0229 100755 --- a/Code/Support/RKPathMatcher.h +++ b/Code/Support/RKPathMatcher.h @@ -44,7 +44,7 @@ @param pathString The string to evaluate and parse, such as /districts/tx/upper/?apikey=GC5512354 @return An instantiated RKPathMatcher without an established pattern. */ -+(RKPathMatcher *)matcherWithPath:(NSString *)pathString; ++ (RKPathMatcher *)matcherWithPath:(NSString *)pathString; /** Determines if the path string matches the provided pattern, and yields a dictionary with the resulting @@ -87,7 +87,7 @@ @param patternString The pattern to use for evaluating, such as /:entityName/:stateID/:chamber/ @return An instantiated RKPathMatcher with an established pattern. */ -+(RKPathMatcher *)matcherWithPattern:(NSString *)patternString; ++ (RKPathMatcher *)matcherWithPattern:(NSString *)patternString; /** Determines if the provided resource path string matches a pattern, and yields a dictionary with the resulting diff --git a/Code/Support/RKPathMatcher.m b/Code/Support/RKPathMatcher.m index 9a6d0d9e..9f1fe940 100755 --- a/Code/Support/RKPathMatcher.m +++ b/Code/Support/RKPathMatcher.m @@ -46,11 +46,11 @@ NSString *RKPathPatternFindAndReplaceParensWithColons(NSString *pattern) { // NSString's stringByAddingPercentEscapes doesn't do a complete job (it ignores "/?&", among others) NSString *RKEncodeURLString(NSString *unencodedString) { NSString *encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes( - NULL, - (CFStringRef)unencodedString, - NULL, - (CFStringRef)@"!*'();:@&=+$,/?%#[]", - kCFStringEncodingUTF8 ); + NULL, + (CFStringRef)unencodedString, + NULL, + (CFStringRef)@"!*'();:@&=+$,/?%#[]", + kCFStringEncodingUTF8); return [encodedString autorelease]; } @@ -87,7 +87,7 @@ NSString *RKEncodeURLString(NSString *unencodedString) { [super dealloc]; } -+(RKPathMatcher *)matcherWithPattern:(NSString *)patternString ++ (RKPathMatcher *)matcherWithPattern:(NSString *)patternString { NSAssert(patternString != NULL, @"Pattern string must not be empty in order to perform pattern matching."); patternString = RKPathPatternFindAndReplaceParensWithColons(patternString); @@ -96,7 +96,7 @@ NSString *RKEncodeURLString(NSString *unencodedString) { return matcher; } -+(RKPathMatcher *)matcherWithPath:(NSString *)pathString ++ (RKPathMatcher *)matcherWithPath:(NSString *)pathString { RKPathMatcher *matcher = [[[RKPathMatcher alloc] init] autorelease]; matcher.sourcePath = pathString; diff --git a/Code/Support/RKPortCheck.m b/Code/Support/RKPortCheck.m index b567a4f3..c8b90298 100644 --- a/Code/Support/RKPortCheck.m +++ b/Code/Support/RKPortCheck.m @@ -34,7 +34,7 @@ _port = port; struct sockaddr_in sa; - char *hostNameOrIPAddressCString = (char *) [hostNameOrIPAddress UTF8String]; + char *hostNameOrIPAddressCString = (char *)[hostNameOrIPAddress UTF8String]; int result = inet_pton(AF_INET, hostNameOrIPAddressCString, &(sa.sin_addr)); if (result != 0) { // IP Address @@ -78,7 +78,7 @@ } // Try to connect to the port - _open = (connect(sd, (struct sockaddr *) &_remote_saddr, sizeof(_remote_saddr)) == 0); + _open = (connect(sd, (struct sockaddr *)&_remote_saddr, sizeof(_remote_saddr)) == 0); if (_open) { close(sd); diff --git a/Code/Testing/RKTestFactory.m b/Code/Testing/RKTestFactory.m index 4156c02e..de836c7a 100644 --- a/Code/Testing/RKTestFactory.m +++ b/Code/Testing/RKTestFactory.m @@ -167,7 +167,7 @@ static RKTestFactory *sharedFactory = nil; + (NSSet *)factoryNames { - return [NSSet setWithArray:[[RKTestFactory sharedFactory].factoryBlocks allKeys] ]; + return [NSSet setWithArray:[[RKTestFactory sharedFactory].factoryBlocks allKeys]]; } + (id)client diff --git a/Code/UI/RKControlTableItem.m b/Code/UI/RKControlTableItem.m index 026954e7..cea55c64 100644 --- a/Code/UI/RKControlTableItem.m +++ b/Code/UI/RKControlTableItem.m @@ -70,27 +70,27 @@ - (UIButton *)button { - return ([self.control isKindOfClass:[UIButton class]]) ? (UIButton *) self.control : nil; + return ([self.control isKindOfClass:[UIButton class]]) ? (UIButton *)self.control : nil; } - (UITextField *)textField { - return ([self.control isKindOfClass:[UITextField class]]) ? (UITextField *) self.control : nil; + return ([self.control isKindOfClass:[UITextField class]]) ? (UITextField *)self.control : nil; } - (UISwitch *)switchControl { - return ([self.control isKindOfClass:[UISwitch class]]) ? (UISwitch *) self.control : nil; + return ([self.control isKindOfClass:[UISwitch class]]) ? (UISwitch *)self.control : nil; } - (UISlider *)slider { - return ([self.control isKindOfClass:[UISlider class]]) ? (UISlider *) self.control : nil; + return ([self.control isKindOfClass:[UISlider class]]) ? (UISlider *)self.control : nil; } - (UILabel *)label { - return ([self.control isKindOfClass:[UILabel class]]) ? (UILabel *) self.control : nil; + return ([self.control isKindOfClass:[UILabel class]]) ? (UILabel *)self.control : nil; } // TODO: What if we replace this with a protocol that enables KVC diff --git a/Code/UI/RKForm.m b/Code/UI/RKForm.m index 59ac915c..d332eb30 100644 --- a/Code/UI/RKForm.m +++ b/Code/UI/RKForm.m @@ -189,7 +189,7 @@ - (RKControlTableItem *)controlTableItemForAttribute:(NSString *)attributeKeyPath { RKTableItem *tableItem = [self tableItemForAttribute:attributeKeyPath]; - return [tableItem isKindOfClass:[RKControlTableItem class]] ? (RKControlTableItem *) tableItem : nil; + return [tableItem isKindOfClass:[RKControlTableItem class]] ? (RKControlTableItem *)tableItem : nil; } - (UIControl *)controlForAttribute:(NSString *)attributeKeyPath @@ -327,7 +327,7 @@ - (void)reloadObjectOnContextDidSaveNotification:(NSNotification *)notification { - NSManagedObjectContext *context = (NSManagedObjectContext *) notification.object; + NSManagedObjectContext *context = (NSManagedObjectContext *)notification.object; NSSet *deletedObjects = [notification.userInfo objectForKey:NSDeletedObjectsKey]; NSSet *updatedObjects = [notification.userInfo objectForKey:NSUpdatedObjectsKey]; diff --git a/Code/UI/RKFormSection.m b/Code/UI/RKFormSection.m index 70b29947..534e78b0 100644 --- a/Code/UI/RKFormSection.m +++ b/Code/UI/RKFormSection.m @@ -63,7 +63,7 @@ case RKFormControlTypeTextFieldSecure:; UITextField *textField = [[[UITextField alloc] init] autorelease]; textField.secureTextEntry = (controlType == RKFormControlTypeTextFieldSecure); - control = (UIControl *) textField; + control = (UIControl *)textField; break; case RKFormControlTypeSwitch:; diff --git a/Code/UI/RKRefreshTriggerView.m b/Code/UI/RKRefreshTriggerView.m index 6656106b..0bb10e52 100644 --- a/Code/UI/RKRefreshTriggerView.m +++ b/Code/UI/RKRefreshTriggerView.m @@ -88,8 +88,8 @@ self.arrowView.center = imageCenter; self.arrowView.frame = CGRectIntegral(self.arrowView.frame); self.activityView.center = imageCenter; - self.titleLabel.frame = CGRectIntegral(CGRectMake(0.0f, ( CGRectGetHeight(self.bounds) * .25f ), CGRectGetWidth(self.bounds), 20.0f)); - self.lastUpdatedLabel.frame = CGRectOffset(self.titleLabel.frame, 0.f, 18.f ); + self.titleLabel.frame = CGRectIntegral(CGRectMake(0.0f, (CGRectGetHeight(self.bounds) * .25f), CGRectGetWidth(self.bounds), 20.0f)); + self.lastUpdatedLabel.frame = CGRectOffset(self.titleLabel.frame, 0.f, 18.f); } #ifdef UI_APPEARANCE_SELECTOR diff --git a/Code/UI/RKTableSection.m b/Code/UI/RKTableSection.m index 73c3717f..7e8c9066 100644 --- a/Code/UI/RKTableSection.m +++ b/Code/UI/RKTableSection.m @@ -91,7 +91,7 @@ } else { [objects retain]; [_objects release]; - _objects = (NSMutableArray *) objects; + _objects = (NSMutableArray *)objects; } } diff --git a/Code/UI/UIImage+RKAdditions.m b/Code/UI/UIImage+RKAdditions.m index de816fa7..fe6a8b00 100644 --- a/Code/UI/UIImage+RKAdditions.m +++ b/Code/UI/UIImage+RKAdditions.m @@ -14,13 +14,13 @@ - (id)initWithContentsOfResolutionIndependentFile:(NSString *)path { - if ( [[[UIDevice currentDevice] systemVersion] intValue] >= 4 && [[UIScreen mainScreen] scale] == 2.0 ) { + if ([[[UIDevice currentDevice] systemVersion] intValue] >= 4 && [[UIScreen mainScreen] scale] == 2.0) { NSString *path2x = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.%@", [[path lastPathComponent] stringByDeletingPathExtension], [path pathExtension]]]; - if ( [[NSFileManager defaultManager] fileExistsAtPath:path2x] ) { + if ([[NSFileManager defaultManager] fileExistsAtPath:path2x]) { return [self initWithCGImage:[[UIImage imageWithData:[NSData dataWithContentsOfFile:path2x]] CGImage] scale:2.0 orientation:UIImageOrientationUp]; } } diff --git a/Examples/RKCatalog/Examples/RKReachabilityExample/RKReachabilityExample.m b/Examples/RKCatalog/Examples/RKReachabilityExample/RKReachabilityExample.m index da6a67f2..534cfa88 100644 --- a/Examples/RKCatalog/Examples/RKReachabilityExample/RKReachabilityExample.m +++ b/Examples/RKCatalog/Examples/RKReachabilityExample/RKReachabilityExample.m @@ -50,7 +50,7 @@ - (void)reachabilityChanged:(NSNotification *)notification { - RKReachabilityObserver *observer = (RKReachabilityObserver *) [notification object]; + RKReachabilityObserver *observer = (RKReachabilityObserver *)[notification object]; RKLogCritical(@"Received reachability update: %@", observer); _flagsLabel.text = [NSString stringWithFormat:@"Host: %@ -> %@", observer.host, [observer reachabilityFlagsDescription]]; diff --git a/Examples/RKCatalog/Examples/RKRelationshipMappingExample/RKRelationshipMappingExample.m b/Examples/RKCatalog/Examples/RKRelationshipMappingExample/RKRelationshipMappingExample.m index fdb0d91d..4642e00b 100644 --- a/Examples/RKCatalog/Examples/RKRelationshipMappingExample/RKRelationshipMappingExample.m +++ b/Examples/RKCatalog/Examples/RKRelationshipMappingExample/RKRelationshipMappingExample.m @@ -151,13 +151,13 @@ } if (indexPath.section == 0) { - Project *project = (Project *) [_objects objectAtIndex:indexPath.row]; + Project *project = (Project *)[_objects objectAtIndex:indexPath.row]; cell.accessoryType = UITableViewCellAccessoryNone; cell.textLabel.text = project.name; } else if (indexPath.section == 1) { // NOTE: We refetch the object here because Project is not Core Data backed NSManagedObject *objectReference = [_selectedProject.tasks objectAtIndex:indexPath.row]; - Task *task = (Task *) [[RKObjectManager sharedManager].objectStore objectWithID:[objectReference objectID]]; + Task *task = (Task *)[[RKObjectManager sharedManager].objectStore objectWithID:[objectReference objectID]]; cell.textLabel.text = [NSString stringWithFormat:@"%@", task.name]; cell.detailTextLabel.text = [NSString stringWithFormat:@"Assigned to: %@", task.assignedUser.name]; } diff --git a/Tests/Logic/Network/RKRequestTest.m b/Tests/Logic/Network/RKRequestTest.m index c99324fa..dfa6fadb 100644 --- a/Tests/Logic/Network/RKRequestTest.m +++ b/Tests/Logic/Network/RKRequestTest.m @@ -680,8 +680,8 @@ request.timeoutInterval = 1.0; { RKParams *params = [RKParams params]; - [params setValue: @"hello" forParam:@"username"]; - [params setValue: @"password" forParam:@"password"]; + [params setValue:@"hello" forParam:@"username"]; + [params setValue:@"password" forParam:@"password"]; RKClient *client = [RKTestFactory client]; client.cachePolicy = RKRequestCachePolicyNone; diff --git a/Tests/Logic/ObjectMapping/RKObjectManagerTest.m b/Tests/Logic/ObjectMapping/RKObjectManagerTest.m index b256f9b7..a47afc1b 100644 --- a/Tests/Logic/ObjectMapping/RKObjectManagerTest.m +++ b/Tests/Logic/ObjectMapping/RKObjectManagerTest.m @@ -176,7 +176,7 @@ RKTestResponseLoader *loader = [RKTestResponseLoader responseLoader]; [_objectManager loadObjectsAtResourcePath:@"/JSON/humans/all.json" delegate:loader]; [loader waitForResponse]; - NSArray *humans = (NSArray *) loader.objects; + NSArray *humans = (NSArray *)loader.objects; assertThatUnsignedInteger([humans count], is(equalToInt(2))); assertThat([humans objectAtIndex:0], is(instanceOf([RKHuman class]))); } diff --git a/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m b/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m index b5dafcc1..51f19600 100644 --- a/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m +++ b/Tests/Logic/ObjectMapping/RKObjectMappingNextGenTest.m @@ -1833,7 +1833,7 @@ { RKObjectMapping *boyMapping = [RKObjectMapping mappingForClass:[Boy class]]; [boyMapping mapAttributes:@"name", nil]; - RKObjectDynamicMapping *dynamicMapping = (RKObjectDynamicMapping *) [RKObjectDynamicMapping dynamicMapping]; + RKObjectDynamicMapping *dynamicMapping = (RKObjectDynamicMapping *)[RKObjectDynamicMapping dynamicMapping]; dynamicMapping.objectMappingForDataBlock = ^ RKObjectMapping *(id mappableData) { if ([[mappableData valueForKey:@"type"] isEqualToString:@"Boy"]) { return boyMapping; diff --git a/Tests/Logic/ObjectMapping/RKObjectRouterTest.m b/Tests/Logic/ObjectMapping/RKObjectRouterTest.m index 66068e7c..3d09b611 100644 --- a/Tests/Logic/ObjectMapping/RKObjectRouterTest.m +++ b/Tests/Logic/ObjectMapping/RKObjectRouterTest.m @@ -53,7 +53,7 @@ @implementation RKObjectRouterTest --(void)testThrowAnExceptionWhenAskedForAPathForAnUnregisteredClassAndMethod +- (void)testThrowAnExceptionWhenAskedForAPathForAnUnregisteredClassAndMethod { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; NSException *exception = nil; @@ -66,7 +66,7 @@ assertThat(exception, isNot(nilValue())); } --(void)testThrowAnExceptionWhenAskedForAPathForARegisteredClassButUnregisteredMethod +- (void)testThrowAnExceptionWhenAskedForAPathForARegisteredClassButUnregisteredMethod { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; [router routeClass:[RKTestObject class] toResourcePath:@"/HumanService.asp" forMethod:RKRequestMethodGET]; @@ -80,7 +80,7 @@ assertThat(exception, isNot(nilValue())); } --(void)testReturnPathsRegisteredForTestificRequestMethods +- (void)testReturnPathsRegisteredForTestificRequestMethods { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; [router routeClass:[RKTestObject class] toResourcePath:@"/HumanService.asp" forMethod:RKRequestMethodGET]; @@ -88,7 +88,7 @@ assertThat(path, is(equalTo(@"/HumanService.asp"))); } --(void)testReturnPathsRegisteredForTheClassAsAWhole +- (void)testReturnPathsRegisteredForTheClassAsAWhole { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; [router routeClass:[RKTestObject class] toResourcePath:@"/HumanService.asp"]; @@ -117,7 +117,7 @@ assertThat(path, is(equalTo(@"/HumanService.asp"))); } --(void)testFavorTestificMethodsWhenClassAndTestificMethodsAreRegistered +- (void)testFavorTestificMethodsWhenClassAndTestificMethodsAreRegistered { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; [router routeClass:[RKTestObject class] toResourcePath:@"/HumanService.asp"]; @@ -130,7 +130,7 @@ assertThat(path, is(equalTo(@"/HumanServiceForPUT.asp"))); } --(void)testRaiseAnExceptionWhenAttemptIsMadeToRegisterOverAnExistingRoute +- (void)testRaiseAnExceptionWhenAttemptIsMadeToRegisterOverAnExistingRoute { RKObjectRouter *router = [[[RKObjectRouter alloc] init] autorelease]; [router routeClass:[RKTestObject class] toResourcePath:@"/HumanService.asp" forMethod:RKRequestMethodGET]; diff --git a/Tests/Logic/Support/NSDictionary+RKRequestSerializationTest.m b/Tests/Logic/Support/NSDictionary+RKRequestSerializationTest.m index d8216185..2a6a5402 100644 --- a/Tests/Logic/Support/NSDictionary+RKRequestSerializationTest.m +++ b/Tests/Logic/Support/NSDictionary+RKRequestSerializationTest.m @@ -73,7 +73,7 @@ NSDictionary *dictA = [NSDictionary dictionaryWithKeysAndObjects:@"a", @"x", @"b", @"y", nil]; NSDictionary *dictB = [NSDictionary dictionaryWithKeysAndObjects:@"a", @"1", @"b", @"2", nil]; - NSArray *array = [NSArray arrayWithObjects: dictA, dictB, nil]; + NSArray *array = [NSArray arrayWithObjects:dictA, dictB, nil]; NSDictionary *dictRoot = [NSDictionary dictionaryWithKeysAndObjects:@"root", array, nil]; NSString *validString = @"root[][a]=x&root[][b]=y&root[][a]=1&root[][b]=2";