File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -103,18 +103,21 @@ class Entity implements JsonSerializable
103
103
];
104
104
105
105
/**
106
- * Holds the current values of all class vars.
106
+ * Holds the current values of all class properties.
107
+ * The values are PHP representation, not the raw values from database.
107
108
*
108
- * @var array
109
+ * @var array<string, mixed>
109
110
*/
110
- protected $ attributes = [];
111
+ protected $ attributes = [
112
+ // db_column_name => PHP_value
113
+ ];
111
114
112
115
/**
113
116
* Holds original copies of all attributes, so we can determine
114
117
* what's actually been changed and not accidentally write
115
118
* nulls where we shouldn't.
116
119
*
117
- * @var array
120
+ * @var array<string, mixed>
118
121
*/
119
122
protected $ original = [];
120
123
@@ -441,7 +444,7 @@ protected function mapProperty(string $key)
441
444
*/
442
445
protected function mutateDate ($ value )
443
446
{
444
- return DatetimeCast::get ($ value );
447
+ return DatetimeCast::set ($ value );
445
448
}
446
449
447
450
/**
You can’t perform that action at this time.
0 commit comments