diff --git a/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m b/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m index e32ec74..ed2feee 100644 --- a/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m +++ b/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m @@ -69,16 +69,16 @@ - (NSDictionary *) getHardCodedResponseForRequest:(MVMCoreRequestParameters *)request { NSDictionary *cannedResponse = nil; - if(_jsonDictionary) { + if (_jsonDictionary) { BOOL matchesQuery = NO; - for(NSString *urlKey in _sortedKeys) { + for (NSString *urlKey in _sortedKeys) { NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithString:urlKey]; - if([urlComponents.path isEqualToString:request.pageType]) { + if ([urlComponents.path isEqualToString:request.pageType]) { matchesQuery = YES; - if(urlComponents.query) { - for(NSURLQueryItem *item in urlComponents.queryItems) { + if (urlComponents.query) { + for (NSURLQueryItem *item in urlComponents.queryItems) { NSString *requestVal = [request.parameters stringForKey:item.name]; - if(!requestVal || ![requestVal isEqualToString:item.value]) { + if (!requestVal || ![requestVal isEqualToString:item.value]) { matchesQuery = NO; break; } @@ -88,7 +88,7 @@ cannedResponse = _jsonDictionary[urlKey]; // keep searching to see if there is a more exact match on parameters } - if(matchesQuery) { + if (matchesQuery) { cannedResponse = _jsonDictionary[urlKey]; // found a request parameters match, accept as the best result and break out break; @@ -101,7 +101,6 @@ cannedResponse = [self getHardCodedResponseForPageType:request.pageType]; } - return cannedResponse; }