Skip to content

Commit

Permalink
- Spelling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emailrus committed Nov 30, 2015
1 parent 99a64d7 commit acc94aa
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ @interface TyphoonOptionMatch : NSObject
@property (nonatomic, strong) id value;
@property (nonatomic) Class memberClass;
@property (nonatomic) Class kindClass;
@property (nonatomic) Protocol *proto;
@property (nonatomic) Protocol *conformProtocol;
@property (nonatomic, strong) id<TyphoonInjection> injection;

+ (id)matchWithValue:(id)value injection:(id)injection;
+ (id)matchWithKindOfClass:(Class)clazz injection:(id)injection;
+ (id)matchWithMemberOfClass:(Class)clazz injection:(id)injection;
+ (id)matchWithConformsToProtocol:(Protocol *)proto injection:(id)injection;
+ (id)matchWithConformsToProtocol:(Protocol *)conformProtocol injection:(id)injection;

@end

Expand Down Expand Up @@ -64,10 +64,10 @@ + (id)matchWithMemberOfClass:(Class)clazz injection:(id)injection
return match;
}

+ (id)matchWithConformsToProtocol:(Protocol *)proto injection:(id)injection
+ (id)matchWithConformsToProtocol:(Protocol *)conformProtocol injection:(id)injection
{
TyphoonOptionMatch *match = [TyphoonOptionMatch new];
match.proto = proto;
match.conformProtocol = conformProtocol;
match.injection = TyphoonMakeInjectionFromObjectIfNeeded(injection);
return match;
}
Expand Down Expand Up @@ -156,8 +156,8 @@ - (TyphoonOptionMatch *)matchForValue:(id)value
BOOL isEqual = (match.value && [match.value isEqual:value]) || ([match.value isEqual:[TyphoonOptionMatchNilValue class]] && !value);
BOOL isKind = (match.kindClass && [value isKindOfClass:match.kindClass]);
BOOL isMember = (match.memberClass && [value isMemberOfClass:match.memberClass]);
BOOL isConforms = (match.proto && [value conformsToProtocol:match.proto]);
if (isEqual || isKind || isMember || isConforms) {
BOOL doesConform = (match.conformProtocol && [value conformsToProtocol:match.conformProtocol]);
if (isEqual || isKind || isMember || doesConform) {
return match;
}
}
Expand Down

0 comments on commit acc94aa

Please sign in to comment.