File tree Expand file tree Collapse file tree 9 files changed +28
-28
lines changed Expand file tree Collapse file tree 9 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ @interface SPLStopwatch()
35
35
36
36
@implementation SPLStopwatch
37
37
38
- -(id )init
38
+ -(instancetype )init
39
39
{
40
40
if (self = [super init ]) {
41
41
self.elapsedSeconds = 0 ;
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ NS_ASSUME_NONNULL_BEGIN
108
108
@return SPLStudyplus object. <br>
109
109
SPLStudyplusオブジェクト。
110
110
*/
111
- + (SPLStudyplus* )studyplusWithConsumerKey : (NSString *)consumerKey
112
- andConsumerSecret : (NSString *)consumerSecret ;
111
+ + (instancetype )studyplusWithConsumerKey : (NSString *)consumerKey
112
+ andConsumerSecret : (NSString *)consumerSecret ;
113
113
114
114
/* *
115
115
Opens the auth screen by invoking the Studyplus application.
Original file line number Diff line number Diff line change @@ -42,15 +42,15 @@ @interface SPLStudyplus()
42
42
43
43
@implementation SPLStudyplus
44
44
45
- + (SPLStudyplus* )studyplusWithConsumerKey : (NSString *)consumerKey
46
- andConsumerSecret : (NSString *)consumerSecret
45
+ + (instancetype )studyplusWithConsumerKey : (NSString *)consumerKey
46
+ andConsumerSecret : (NSString *)consumerSecret
47
47
{
48
48
return [[SPLStudyplus alloc ] __initWithConsumerKey: consumerKey
49
49
andConsumerSecret: consumerSecret];
50
50
}
51
51
52
- - (id )__initWithConsumerKey : (NSString *)consumerKey
53
- andConsumerSecret : (NSString *)consumerSecret
52
+ - (instancetype )__initWithConsumerKey : (NSString *)consumerKey
53
+ andConsumerSecret : (NSString *)consumerSecret
54
54
{
55
55
56
56
if (self = [super init ]) {
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
26
26
27
27
@interface SPLStudyplusAPIRequest : NSObject
28
28
29
- + (SPLStudyplusAPIRequest* )newRequestWithAccessToken : (NSString *)accessToken
30
- options : (NSDictionary *)options ;
29
+ + (instancetype )newRequestWithAccessToken : (NSString *)accessToken
30
+ options : (NSDictionary *)options ;
31
31
32
32
- (void )postRequestWithPath : (NSString *)path
33
33
requestParameter : (NSDictionary *)requestParameter
Original file line number Diff line number Diff line change @@ -35,23 +35,23 @@ @interface SPLStudyplusAPIRequest()
35
35
36
36
@implementation SPLStudyplusAPIRequest
37
37
38
- - (id )init
38
+ - (instancetype )init
39
39
{
40
40
if (self = [super init ]) {
41
41
_accessToken = nil ;
42
42
}
43
43
return self;
44
44
}
45
45
46
- + (SPLStudyplusAPIRequest* )newRequestWithAccessToken : (NSString *)accessToken
47
- options : (NSDictionary *)options
46
+ + (instancetype )newRequestWithAccessToken : (NSString *)accessToken
47
+ options : (NSDictionary *)options
48
48
{
49
49
return [[SPLStudyplusAPIRequest alloc ] initWithAccessToken: accessToken
50
50
options: options];
51
51
}
52
52
53
- - (id )initWithAccessToken : (NSString *)accessToken
54
- options : (NSDictionary *)options
53
+ - (instancetype )initWithAccessToken : (NSString *)accessToken
54
+ options : (NSDictionary *)options
55
55
{
56
56
if (self = [super init ]) {
57
57
_accessToken = accessToken;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
67
67
68
68
@result StudyplusRecord object.
69
69
*/
70
- + (SPLStudyplusRecord* )recordWithDuration : (NSTimeInterval )duration ;
70
+ + (instancetype )recordWithDuration : (NSTimeInterval )duration ;
71
71
72
72
/* *
73
73
Creates and returns StudyplusRecord object that has number of seconds and other attributes.
@@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
89
89
90
90
@result StudyplusRecord object.
91
91
*/
92
- + (SPLStudyplusRecord* )recordWithDuration : (NSTimeInterval )duration options : (NSDictionary * _Nullable)options ;
92
+ + (instancetype )recordWithDuration : (NSTimeInterval )duration options : (NSDictionary * _Nullable)options ;
93
93
94
94
/* *
95
95
@result Returns the parameters of the study record for posting API
Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ - (id)getKey:(NSString*)key orElse:(id)elseValue;
33
33
34
34
@implementation SPLStudyplusRecord
35
35
36
- + (SPLStudyplusRecord* )recordWithDuration : (NSTimeInterval )duration
36
+ + (instancetype )recordWithDuration : (NSTimeInterval )duration
37
37
{
38
38
return [self recordWithDuration: duration options: @{}];
39
39
}
40
40
41
- + (SPLStudyplusRecord* )recordWithDuration : (NSTimeInterval )duration options : (NSDictionary *)options
41
+ + (instancetype )recordWithDuration : (NSTimeInterval )duration options : (NSDictionary *)options
42
42
{
43
43
return [[[self class ] alloc ] initWithDuration: duration options: options];
44
44
}
@@ -52,7 +52,7 @@ - (id)getKey:(NSString *)key from:(NSDictionary *)dict orElse:(id)elseValue
52
52
return value;
53
53
}
54
54
55
- - (id )initWithDuration : (NSTimeInterval )duration options : (NSDictionary *)options
55
+ - (instancetype )initWithDuration : (NSTimeInterval )duration options : (NSDictionary *)options
56
56
{
57
57
if (self = [super init ]) {
58
58
_duration = duration;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
37
37
@param amount 学習量。
38
38
@result SPLStudyplusRecordAmount* 生成したAmountオブジェクトです。
39
39
*/
40
- + (SPLStudyplusRecordAmount* )amount : (NSUInteger )amount ;
40
+ + (instancetype )amount : (NSUInteger )amount ;
41
41
42
42
/* *
43
43
Creates and returns the Amount object with a range of learning amount.<br>
@@ -47,14 +47,14 @@ NS_ASSUME_NONNULL_BEGIN
47
47
@param to 学習量の終点。
48
48
@result SPLStudyplusRecordAmount* 生成したAmountオブジェクトです。
49
49
*/
50
- + (SPLStudyplusRecordAmount* )amountAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to ;
50
+ + (instancetype )amountAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to ;
51
51
52
52
/* *
53
53
Creates and returns the Amount object that has no learning amount.<br>
54
54
学習量を持たないAmountオブジェクトを生成して返します。
55
55
@result SPLStudyplusRecordAmount* 生成したAmountオブジェクトです。
56
56
*/
57
- + (SPLStudyplusRecordAmount* )amountAsNone ;
57
+ + (instancetype )amountAsNone ;
58
58
59
59
/* *
60
60
@result Returns the parameters of the study record for posting API
Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ @interface SPLStudyplusRecordAmount()
28
28
29
29
@implementation SPLStudyplusRecordAmount
30
30
31
- + (SPLStudyplusRecordAmount* )amount : (NSUInteger )amount
31
+ + (instancetype )amount : (NSUInteger )amount
32
32
{
33
33
return [[[self class ] alloc ] initAsAmount: amount];
34
34
}
35
35
36
- - (id )initAsAmount : (NSUInteger )amount
36
+ - (instancetype )initAsAmount : (NSUInteger )amount
37
37
{
38
38
if (self = [super init ]) {
39
39
_requestParameter = @{
@@ -43,12 +43,12 @@ - (id)initAsAmount:(NSUInteger)amount
43
43
return self;
44
44
}
45
45
46
- + (SPLStudyplusRecordAmount* )amountAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to
46
+ + (instancetype )amountAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to
47
47
{
48
48
return [[[self class ] alloc ] initAsRangeWithFrom: from to: to];
49
49
}
50
50
51
- - (id )initAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to
51
+ - (instancetype )initAsRangeWithFrom : (NSUInteger )from to : (NSUInteger )to
52
52
{
53
53
if (self = [super init ]) {
54
54
_requestParameter = @{
@@ -59,12 +59,12 @@ - (id)initAsRangeWithFrom:(NSUInteger)from to:(NSUInteger)to
59
59
return self;
60
60
}
61
61
62
- + (SPLStudyplusRecordAmount* )amountAsNone
62
+ + (instancetype )amountAsNone
63
63
{
64
64
return [[[self class ] alloc ] initAsNone ];
65
65
}
66
66
67
- - (id )initAsNone
67
+ - (instancetype )initAsNone
68
68
{
69
69
if (self = [super init ]) {
70
70
_requestParameter = @{};
You can’t perform that action at this time.
0 commit comments