@@ -133,49 +133,14 @@ private function generateSignature(\ReflectionClass $class)
133133 }
134134 }
135135
136- if (defined ('HHVM_VERSION ' )) {
137- foreach ($ class ->getMethods (\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED ) as $ m ) {
138- // workaround HHVM bug with variadics, see https://github.com/facebook/hhvm/issues/5762
139- yield preg_replace ('/^ @@.*/m ' , '' , new ReflectionMethodHhvmWrapper ($ m ->class , $ m ->name ));
140- }
141- } else {
142- foreach ($ class ->getMethods (\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED ) as $ m ) {
143- yield preg_replace ('/^ @@.*/m ' , '' , $ m );
136+ foreach ($ class ->getMethods (\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED ) as $ m ) {
137+ yield preg_replace ('/^ @@.*/m ' , '' , $ m );
144138
145- $ defaults = array ();
146- foreach ($ m ->getParameters () as $ p ) {
147- $ defaults [$ p ->name ] = $ p ->isDefaultValueAvailable () ? $ p ->getDefaultValue () : null ;
148- }
149- yield print_r ($ defaults , true );
139+ $ defaults = array ();
140+ foreach ($ m ->getParameters () as $ p ) {
141+ $ defaults [$ p ->name ] = $ p ->isDefaultValueAvailable () ? $ p ->getDefaultValue () : null ;
150142 }
143+ yield print_r ($ defaults , true );
151144 }
152145 }
153146}
154-
155- /**
156- * @internal
157- */
158- class ReflectionMethodHhvmWrapper extends \ReflectionMethod
159- {
160- public function getParameters ()
161- {
162- $ params = array ();
163-
164- foreach (parent ::getParameters () as $ i => $ p ) {
165- $ params [] = new ReflectionParameterHhvmWrapper (array ($ this ->class , $ this ->name ), $ i );
166- }
167-
168- return $ params ;
169- }
170- }
171-
172- /**
173- * @internal
174- */
175- class ReflectionParameterHhvmWrapper extends \ReflectionParameter
176- {
177- public function getDefaultValue ()
178- {
179- return array ($ this ->isVariadic (), $ this ->isDefaultValueAvailable () ? parent ::getDefaultValue () : null );
180- }
181- }
0 commit comments