Permalink
Browse files

Break ternary operator into conditional.

Ternary operator much too long to read. Break into a conditional block
to improve readability.
  • Loading branch information...
1 parent 286ebfa commit 81cc1bdb267af46740db5561c31e948d04106a67 @modocache modocache committed Mar 1, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 SenTestingKit/SenTestSuite+KiwiAdditions.m
View
7 SenTestingKit/SenTestSuite+KiwiAdditions.m
@@ -37,7 +37,12 @@ + (void)patchTestSuiteForTestCaseClassIMP {
IMP focusedSuite = imp_implementationWithBlock(^(id _self, Class aClass){
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- return ([[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] && ![_self testSuiteClassHasFocus:aClass]) ? nil : (__bridge void *)[_self performSelector:newSEL withObject:aClass];
+ if ([[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] &&
+ ![_self testSuiteClassHasFocus:aClass]) {
+ return nil;
+ } else {
+ return (__bridge void *)[_self performSelector:newSEL withObject:aClass];
+ }
#pragma clang diagnostic pop
});
method_setImplementation(origMethod, focusedSuite);

0 comments on commit 81cc1bd

Please sign in to comment.