File tree 1 file changed +6
-2
lines changed
src/Psalm/Internal/Codebase
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -130,18 +130,22 @@ public function registerClass(\ReflectionClass $reflected_class)
130
130
131
131
// have to do this separately as there can be new properties here
132
132
foreach ($ public_mapped_properties as $ property_name => $ type ) {
133
+ $ property_id = $ class_name . '::$ ' . $ property_name ;
134
+
133
135
if (!isset ($ storage ->properties [$ property_name ])) {
134
136
$ storage ->properties [$ property_name ] = new PropertyStorage ();
135
137
$ storage ->properties [$ property_name ]->visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC ;
136
138
137
- $ property_id = $ class_name . '::$ ' . $ property_name ;
138
-
139
139
$ storage ->declaring_property_ids [$ property_name ] = $ class_name ;
140
140
$ storage ->appearing_property_ids [$ property_name ] = $ property_id ;
141
141
$ storage ->inheritable_property_ids [$ property_name ] = $ property_id ;
142
142
}
143
143
144
144
$ storage ->properties [$ property_name ]->type = Type::parseString ($ type );
145
+
146
+ if ($ property_id === 'DateInterval::$days ' ) {
147
+ $ storage ->properties [$ property_name ]->type ->ignore_falsable_issues = true ;
148
+ }
145
149
}
146
150
147
151
/** @var array<string, int|string|float|null|array> */
You can’t perform that action at this time.
0 commit comments