Skip to content

Commit f551a2c

Browse files
committed
removed HHVM support
1 parent e648856 commit f551a2c

File tree

1 file changed

+6
-41
lines changed

1 file changed

+6
-41
lines changed

Resource/ReflectionClassResource.php

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)