@@ -62,11 +62,6 @@ class Serializer
62
62
'string ' => 'serializeScalar ' ,
63
63
];
64
64
65
- /**
66
- * @var bool
67
- */
68
- protected $ isHHVM ;
69
-
70
65
/**
71
66
* Hack specific serialization classes.
72
67
*
@@ -79,16 +74,7 @@ class Serializer
79
74
*/
80
75
public function __construct (StrategyInterface $ strategy )
81
76
{
82
- $ this ->isHHVM = \defined ('HHVM_VERSION ' );
83
- if ($ this ->isHHVM ) {
84
- // @codeCoverageIgnoreStart
85
- $ this ->serializationMap = \array_merge (
86
- $ this ->serializationMap ,
87
- include \realpath (\dirname (__FILE__ ).'/Mapping/serialization_hhvm.php ' )
88
- );
89
- $ this ->unserializationMapHHVM = include \realpath (\dirname (__FILE__ ).'/Mapping/unserialization_hhvm.php ' );
90
- // @codeCoverageIgnoreEnd
91
- }
77
+
92
78
$ this ->serializationStrategy = $ strategy ;
93
79
}
94
80
@@ -142,12 +128,6 @@ protected function serializeData($value)
142
128
{
143
129
$ this ->guardForUnsupportedValues ($ value );
144
130
145
- if ($ this ->isHHVM && ($ value instanceof \DateTimeZone || $ value instanceof \DateInterval)) {
146
- // @codeCoverageIgnoreStart
147
- return \call_user_func_array ($ this ->serializationMap [get_class ($ value )], [$ this , $ value ]);
148
- // @codeCoverageIgnoreEnd
149
- }
150
-
151
131
if ($ this ->isInstanceOf ($ value , 'SplFixedArray ' )) {
152
132
return SplFixedArraySerializer::serialize ($ this , $ value );
153
133
}
@@ -313,15 +293,6 @@ protected function unserializeDateTimeFamilyObject(array $value, $className)
313
293
$ obj = null ;
314
294
315
295
if ($ this ->isDateTimeFamilyObject ($ className )) {
316
- if ($ this ->isHHVM ) {
317
- // @codeCoverageIgnoreStart
318
- return \call_user_func_array (
319
- $ this ->unserializationMapHHVM [$ className ],
320
- [$ this , $ className , $ value ]
321
- );
322
- // @codeCoverageIgnoreEnd
323
- }
324
-
325
296
$ obj = $ this ->restoreUsingUnserialize ($ className , $ value );
326
297
self ::$ objectMapping [self ::$ objectMappingIndex ++] = $ obj ;
327
298
}
0 commit comments