@@ -27,8 +27,8 @@ class Indexes extends Endpoint
27
27
28
28
private ?string $ uid ;
29
29
private ?string $ primaryKey ;
30
- private ?string $ createdAt ;
31
- private ?string $ updatedAt ;
30
+ private ?\ DateTime $ createdAt ;
31
+ private ?\ DateTime $ updatedAt ;
32
32
private Tasks $ tasks ;
33
33
34
34
public function __construct (Http $ http , $ uid = null , $ primaryKey = null , $ createdAt = null , $ updatedAt = null )
@@ -48,8 +48,8 @@ protected function newInstance(array $attributes): self
48
48
$ this ->http ,
49
49
$ attributes ['uid ' ],
50
50
$ attributes ['primaryKey ' ],
51
- $ attributes ['createdAt ' ],
52
- $ attributes ['updatedAt ' ],
51
+ static :: parseDate ( $ attributes ['createdAt ' ]) ,
52
+ static :: parseDate ( $ attributes ['updatedAt ' ]) ,
53
53
);
54
54
}
55
55
@@ -60,8 +60,8 @@ protected function fill(array $attributes): self
60
60
{
61
61
$ this ->uid = $ attributes ['uid ' ];
62
62
$ this ->primaryKey = $ attributes ['primaryKey ' ];
63
- $ this ->createdAt = $ attributes ['createdAt ' ];
64
- $ this ->updatedAt = $ attributes ['updatedAt ' ];
63
+ $ this ->createdAt = static :: parseDate ( $ attributes ['createdAt ' ]) ;
64
+ $ this ->updatedAt = static :: parseDate ( $ attributes ['updatedAt ' ]) ;
65
65
66
66
return $ this ;
67
67
}
@@ -112,21 +112,11 @@ public function getUid(): ?string
112
112
}
113
113
114
114
public function getCreatedAt (): ?\DateTime
115
- {
116
- return static ::parseDate ($ this ->createdAt );
117
- }
118
-
119
- public function getCreatedAtString (): ?string
120
115
{
121
116
return $ this ->createdAt ;
122
117
}
123
118
124
119
public function getUpdatedAt (): ?\DateTime
125
- {
126
- return static ::parseDate ($ this ->updatedAt );
127
- }
128
-
129
- public function getUpdatedAtString (): ?string
130
120
{
131
121
return $ this ->updatedAt ;
132
122
}
0 commit comments