Rename `NSArray+Stripe_BoundSafe` to just `NSArray+Stripe`

We're going to add a few more helpers to this category but not so many that a separate category namespace is neccessary
This commit is contained in:
Joey Dong 2017-07-25 10:26:04 -07:00
parent 9c81261775
commit 7be74c27ce
10 changed files with 34 additions and 33 deletions

View File

@ -205,15 +205,15 @@
04A488431CA3580700506E53 /* UINavigationController+Stripe_Completion.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A488401CA3580700506E53 /* UINavigationController+Stripe_Completion.h */; };
04A488441CA3580700506E53 /* UINavigationController+Stripe_Completion.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A488411CA3580700506E53 /* UINavigationController+Stripe_Completion.m */; };
04A488451CA3580700506E53 /* UINavigationController+Stripe_Completion.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A488411CA3580700506E53 /* UINavigationController+Stripe_Completion.m */; };
04A4C3891C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3851C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h */; };
04A4C38A1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3851C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h */; };
04A4C38B1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3861C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m */; };
04A4C38C1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3861C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m */; };
04A4C3891C4F25F900B3B290 /* NSArray+Stripe.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3851C4F25F900B3B290 /* NSArray+Stripe.h */; };
04A4C38A1C4F25F900B3B290 /* NSArray+Stripe.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3851C4F25F900B3B290 /* NSArray+Stripe.h */; };
04A4C38B1C4F25F900B3B290 /* NSArray+Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3861C4F25F900B3B290 /* NSArray+Stripe.m */; };
04A4C38C1C4F25F900B3B290 /* NSArray+Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3861C4F25F900B3B290 /* NSArray+Stripe.m */; };
04A4C38D1C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3871C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.h */; };
04A4C38E1C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 04A4C3871C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.h */; };
04A4C38F1C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3881C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m */; };
04A4C3901C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3881C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m */; };
04A4C3921C4F263300B3B290 /* NSArray+StripeBoundSafeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3911C4F263300B3B290 /* NSArray+StripeBoundSafeTests.m */; };
04A4C3921C4F263300B3B290 /* NSArray+StripeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3911C4F263300B3B290 /* NSArray+StripeTest.m */; };
04A4C3941C4F276100B3B290 /* STPUIVCStripeParentViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A4C3931C4F276100B3B290 /* STPUIVCStripeParentViewControllerTests.m */; };
04B31DD41D08E6E200EF1631 /* STPCustomer.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B31DD21D08E6E200EF1631 /* STPCustomer.h */; settings = {ATTRIBUTES = (Public, ); }; };
04B31DD51D08E6E200EF1631 /* STPCustomer.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B31DD21D08E6E200EF1631 /* STPCustomer.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -886,11 +886,11 @@
04A4883B1CA3568800506E53 /* STPBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STPBlocks.h; path = PublicHeaders/STPBlocks.h; sourceTree = "<group>"; };
04A488401CA3580700506E53 /* UINavigationController+Stripe_Completion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+Stripe_Completion.h"; sourceTree = "<group>"; };
04A488411CA3580700506E53 /* UINavigationController+Stripe_Completion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+Stripe_Completion.m"; sourceTree = "<group>"; };
04A4C3851C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Stripe_BoundSafe.h"; sourceTree = "<group>"; };
04A4C3861C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Stripe_BoundSafe.m"; sourceTree = "<group>"; };
04A4C3851C4F25F900B3B290 /* NSArray+Stripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Stripe.h"; sourceTree = "<group>"; };
04A4C3861C4F25F900B3B290 /* NSArray+Stripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Stripe.m"; sourceTree = "<group>"; };
04A4C3871C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Stripe_ParentViewController.h"; sourceTree = "<group>"; };
04A4C3881C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Stripe_ParentViewController.m"; sourceTree = "<group>"; };
04A4C3911C4F263300B3B290 /* NSArray+StripeBoundSafeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+StripeBoundSafeTests.m"; sourceTree = "<group>"; };
04A4C3911C4F263300B3B290 /* NSArray+StripeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+StripeTest.m"; sourceTree = "<group>"; };
04A4C3931C4F276100B3B290 /* STPUIVCStripeParentViewControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPUIVCStripeParentViewControllerTests.m; sourceTree = "<group>"; };
04A58A461BC603BB004E7BC2 /* FABKitProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FABKitProtocol.h; sourceTree = "<group>"; };
04A58A471BC603BB004E7BC2 /* Fabric+FABKits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Fabric+FABKits.h"; sourceTree = "<group>"; };
@ -1497,7 +1497,7 @@
C18867D81E8B093300A77634 /* Unit */ = {
isa = PBXGroup;
children = (
04A4C3911C4F263300B3B290 /* NSArray+StripeBoundSafeTests.m */,
04A4C3911C4F263300B3B290 /* NSArray+StripeTest.m */,
C11810981CC6D46D0022FB55 /* NSDecimalNumber+StripeTest.m */,
C124A1801CCAA1BF007D42EE /* NSMutableURLRequest+StripeTest.m */,
C1EEDCC71CA2172700A54582 /* NSString+StripeTest.m */,
@ -1610,8 +1610,8 @@
F1728CEA1EAAA262002E0C29 /* Categories */ = {
isa = PBXGroup;
children = (
04A4C3851C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h */,
04A4C3861C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m */,
04A4C3851C4F25F900B3B290 /* NSArray+Stripe.h */,
04A4C3861C4F25F900B3B290 /* NSArray+Stripe.m */,
049A3F971CC76A2400F57DE7 /* NSBundle+Stripe_AppName.h */,
049A3F981CC76A2400F57DE7 /* NSBundle+Stripe_AppName.m */,
049A3F8F1CC740FF00F57DE7 /* NSDecimalNumber+Stripe_Currency.h */,
@ -2013,7 +2013,7 @@
F1A0197D1EA5733200354301 /* STPSourceParams+Private.h in Headers */,
04633B161CD45222009D4FB5 /* STPAPIClient+ApplePay.h in Headers */,
0438EF2E1B7416BB00D506CC /* STPFormTextField.h in Headers */,
04A4C38A1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h in Headers */,
04A4C38A1C4F25F900B3B290 /* NSArray+Stripe.h in Headers */,
04F94D9D1D229EFF004FC826 /* STPEmailAddressValidator.h in Headers */,
049E84E61A605EF0000B66CD /* STPAPIClient.h in Headers */,
F15232211EA92FCF00D65C67 /* STPRedirectContext.h in Headers */,
@ -2157,7 +2157,7 @@
F1FA6F951E25960500EB444D /* STPCoreScrollViewController+Private.h in Headers */,
C17A030D1CBEE7A2006C819F /* STPAddressFieldTableViewCell.h in Headers */,
C1C1012D1E57A26F00C7BFAE /* STPSource+Private.h in Headers */,
04A4C3891C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.h in Headers */,
04A4C3891C4F25F900B3B290 /* NSArray+Stripe.h in Headers */,
04827D151D257764002DB3E8 /* STPImageLibrary+Private.h in Headers */,
049952D21BCF13DD0088C703 /* STPAPIClient+Private.h in Headers */,
8B429AD81EF9D4B400F95F34 /* STPBankAccountParams+Private.h in Headers */,
@ -2631,7 +2631,7 @@
C1CFCB6E1ED5E0F800BE45DF /* STPMocks.m in Sources */,
04827D181D257A6C002DB3E8 /* STPImageLibraryTest.m in Sources */,
0438EF4C1B741B0100D506CC /* STPCardValidatorTest.m in Sources */,
04A4C3921C4F263300B3B290 /* NSArray+StripeBoundSafeTests.m in Sources */,
04A4C3921C4F263300B3B290 /* NSArray+StripeTest.m in Sources */,
F148ABFB1D5E88C70014FD92 /* STPTestUtils.m in Sources */,
045A62AB1B8E7259000165CE /* STPPaymentCardTextFieldTest.m in Sources */,
C127110A1DBA7E490087840D /* STPAddressViewModelTest.m in Sources */,
@ -2710,7 +2710,7 @@
04633B021CD129D0009D4FB5 /* STPDelegateProxy.m in Sources */,
04B31DFC1D11AC6400EF1631 /* STPUserInformation.m in Sources */,
F1D3A25D1EB014BD0095BFA9 /* UIImage+Stripe.m in Sources */,
04A4C38C1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m in Sources */,
04A4C38C1C4F25F900B3B290 /* NSArray+Stripe.m in Sources */,
04F94DCE1D22A232004FC826 /* UIViewController+Stripe_KeyboardAvoiding.m in Sources */,
04B31E021D131D9000EF1631 /* STPPaymentCardTextFieldCell.m in Sources */,
C1D7B5231E36C32F002181F5 /* STPSource.m in Sources */,
@ -2851,7 +2851,7 @@
C124A1721CCA968B007D42EE /* STPAnalyticsClient.m in Sources */,
C158AB401E1EE98900348D01 /* STPSectionHeaderView.m in Sources */,
F148ABC81D5D334B0014FD92 /* STPLocalizationUtils.m in Sources */,
04A4C38B1C4F25F900B3B290 /* NSArray+Stripe_BoundSafe.m in Sources */,
04A4C38B1C4F25F900B3B290 /* NSArray+Stripe.m in Sources */,
F19491E41E60DD72001E1FC2 /* STPSourceSEPADebitDetails.m in Sources */,
04A4C38F1C4F25F900B3B290 /* UIViewController+Stripe_ParentViewController.m in Sources */,
049A3FAF1CC9AA9900F57DE7 /* STPAddressViewModel.m in Sources */,

View File

@ -1,5 +1,5 @@
//
// NSArray+Stripe_BoundSafe.h
// NSArray+Stripe.h
// Stripe
//
// Created by Jack Flintermann on 1/19/16.
@ -8,10 +8,10 @@
#import <Foundation/Foundation.h>
@interface NSArray (Stripe_BoundSafe)
@interface NSArray (Stripe)
- (nullable id)stp_boundSafeObjectAtIndex:(NSInteger)index;
@end
void linkNSArrayBoundSafeCategory(void);
void linkNSArrayCategory(void);

View File

@ -6,9 +6,9 @@
// Copyright © 2016 Stripe, Inc. All rights reserved.
//
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
@implementation NSArray (Stripe_BoundSafe)
@implementation NSArray (Stripe)
- (nullable id)stp_boundSafeObjectAtIndex:(NSInteger)index {
if (index + 1 > (NSInteger)self.count || index < 0) {
@ -19,4 +19,4 @@
@end
void linkNSArrayBoundSafeCategory(void){}
void linkNSArrayCategory(void){}

View File

@ -8,7 +8,7 @@
#import "STPAddCardViewController.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "STPAddressFieldTableViewCell.h"
#import "STPAddressViewModel.h"
#import "STPAnalyticsClient.h"

View File

@ -8,7 +8,7 @@
#import "STPAddressViewModel.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "STPDispatchFunctions.h"
#import "STPPostalCodeValidator.h"

View File

@ -10,7 +10,7 @@
#import "STPCategoryLoader.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "NSBundle+Stripe_AppName.h"
#import "NSCharacterSet+Stripe.h"
#import "NSDecimalNumber+Stripe_Currency.h"
@ -39,7 +39,7 @@
+ (void)loadCategories {
linkAspectsCategory();
linkNSArrayBoundSafeCategory();
linkNSArrayCategory();
linkNSBundleAppNameCategory();
linkNSDecimalNumberCurrencyCategory();
linkNSDictionaryCategory();

View File

@ -8,7 +8,7 @@
#import "STPPaymentMethodsInternalViewController.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "STPAddCardViewController.h"
#import "STPAddCardViewController+Private.h"
#import "STPCoreTableViewController.h"

View File

@ -8,7 +8,7 @@
#import "STPShippingAddressViewController.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "STPAddress.h"
#import "STPAddressViewModel.h"
#import "STPColorUtils.h"

View File

@ -8,7 +8,7 @@
#import "STPShippingMethodsViewController.h"
#import "NSArray+Stripe_BoundSafe.h"
#import "NSArray+Stripe.h"
#import "STPColorUtils.h"
#import "STPCoreTableViewController+Private.h"
#import "STPImageLibrary+Private.h"

View File

@ -1,5 +1,5 @@
//
// STPNSArrayStripeBoundSafeTests.m
// NSArray+StripeTest.m
// Stripe
//
// Created by Jack Flintermann on 1/19/16.
@ -7,13 +7,14 @@
//
#import <XCTest/XCTest.h>
#import "NSArray+Stripe_BoundSafe.h"
@interface NSArray_StripeBoundSafeTests : XCTestCase
#import "NSArray+Stripe.h"
@interface NSArray_StripeTest : XCTestCase
@end
@implementation NSArray_StripeBoundSafeTests
@implementation NSArray_StripeTest
- (void)testEmptyArray {
XCTAssertNil([@[] stp_boundSafeObjectAtIndex:5]);