13
13
#import " PFMutableFileState.h"
14
14
#import " PFPropertyInfo.h"
15
15
16
- static NSString *const _PFFileStateSecureDomain = @" files.parsetfss.com" ;
17
-
18
- @interface PFFileState ()
16
+ NS_ASSUME_NONNULL_BEGIN
19
17
20
- @property (nonatomic , copy , readwrite ) NSString *secureURLString;
21
-
22
- @end
18
+ static NSString *const _PFFileStateSecureDomain = @" files.parsetfss.com" ;
23
19
24
20
@implementation PFFileState
25
21
22
+ @synthesize secureURLString = _secureURLString;
23
+
26
24
// /--------------------------------------
27
25
#pragma mark - PFBaseStateSubclass
28
26
// /--------------------------------------
@@ -41,7 +39,9 @@ - (instancetype)initWithState:(PFFileState *)state {
41
39
return [super initWithState: state];
42
40
}
43
41
44
- - (instancetype )initWithName : (NSString *)name urlString : (NSString *)urlString mimeType : (NSString *)mimeType {
42
+ - (instancetype )initWithName : (nullable NSString *)name
43
+ urlString : (nullable NSString *)urlString
44
+ mimeType : (nullable NSString *)mimeType {
45
45
self = [super init ];
46
46
if (!self) return nil ;
47
47
@@ -56,14 +56,14 @@ - (instancetype)initWithName:(NSString *)name urlString:(NSString *)urlString mi
56
56
#pragma mark - Accessors
57
57
// /--------------------------------------
58
58
59
- - (void )setUrlString : (NSString *)urlString {
59
+ - (void )setUrlString : (nullable NSString *)urlString {
60
60
if (self.urlString != urlString) {
61
61
_urlString = [urlString copy ];
62
62
_secureURLString = nil ; // Invalidate variable cache
63
63
}
64
64
}
65
65
66
- - (NSString *)secureURLString {
66
+ - (nullable NSString *)secureURLString {
67
67
if (_secureURLString) {
68
68
return _secureURLString;
69
69
}
@@ -93,12 +93,14 @@ - (NSString *)secureURLString {
93
93
#pragma mark - Mutable Copying
94
94
// /--------------------------------------
95
95
96
- - (id )copyWithZone : (NSZone *)zone {
96
+ - (id )copyWithZone : (nullable NSZone *)zone {
97
97
return [[PFFileState allocWithZone: zone] initWithState: self ];
98
98
}
99
99
100
- - (instancetype )mutableCopyWithZone : (NSZone *)zone {
100
+ - (instancetype )mutableCopyWithZone : (nullable NSZone *)zone {
101
101
return [[PFMutableFileState allocWithZone: zone] initWithState: self ];
102
102
}
103
103
104
104
@end
105
+
106
+ NS_ASSUME_NONNULL_END
0 commit comments