@@ -135,16 +135,7 @@ public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub,
135
135
Caster::PREFIX_VIRTUAL .'type ' => $ c ->getType (),
136
136
Caster::PREFIX_VIRTUAL .'in_daylight_time ' => $ c ->inDaylightTime (),
137
137
Caster::PREFIX_VIRTUAL .'is_lenient ' => $ c ->isLenient (),
138
- );
139
-
140
- if ($ filter & Caster::EXCLUDE_VERBOSE ) {
141
- ++$ stub ->cut ;
142
-
143
- return self ::castError ($ c , $ a );
144
- }
145
-
146
- $ a += array (
147
- Caster::PREFIX_VIRTUAL .'time_zone ' => $ c ->getTimeZone (),
138
+ Caster::PREFIX_VIRTUAL .'time_zone ' => ($ filter & Caster::EXCLUDE_VERBOSE ) ? new CutStub ($ c ->getTimeZone ()) : $ c ->getTimeZone ()
148
139
);
149
140
150
141
return self ::castError ($ c , $ a );
@@ -159,17 +150,8 @@ public s
A7A3
tatic function castIntlDateFormatter(\IntlDateFormatter $c, array $a, St
159
150
Caster::PREFIX_VIRTUAL .'time_zone_id ' => $ c ->getTimeZoneId (),
160
151
Caster::PREFIX_VIRTUAL .'time_type ' => $ c ->getTimeType (),
161
152
Caster::PREFIX_VIRTUAL .'date_type ' => $ c ->getDateType (),
162
- );
163
-
164
- if ($ filter & Caster::EXCLUDE_VERBOSE ) {
165
- $ stub ->cut += 2 ;
166
-
167
- return self ::castError ($ c , $ a );
168
- }
169
-
170
- $ a += array (
171
- Caster::PREFIX_VIRTUAL .'calendar_object ' => $ c ->getCalendarObject (),
172
- Caster::PREFIX_VIRTUAL .'time_zone ' => $ c ->getTimeZone (),
153
+ Caster::PREFIX_VIRTUAL .'calendar_object ' => ($ filter & Caster::EXCLUDE_VERBOSE ) ? new CutStub ($ c ->getCalendarObject ()) : $ c ->getCalendarObject (),
154
+ Caster::PREFIX_VIRTUAL .'time_zone ' => ($ filter & Caster::EXCLUDE_VERBOSE ) ? new CutStub ($ c ->getTimeZone ()) : $ c ->getTimeZone ()
173
155
);
174
156
175
157
return self ::castError ($ c , $ a );
0 commit comments