public function ObjectManagerDecoratorTest::getMethodParameters in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php \Doctrine\Tests\Common\Persistence\ObjectManagerDecoratorTest::getMethodParameters()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ ObjectManagerDecoratorTest.php, line 27
Class
Namespace
Doctrine\Tests\Common\PersistenceCode
public function getMethodParameters() {
$class = new \ReflectionClass('Doctrine\\Common\\Persistence\\ObjectManager');
$methods = array();
foreach ($class
->getMethods() as $method) {
if ($method
->getNumberOfRequiredParameters() === 0) {
$methods[] = array(
$method
->getName(),
array(),
);
}
elseif ($method
->getNumberOfRequiredParameters() > 0) {
$methods[] = array(
$method
->getName(),
array_fill(0, $method
->getNumberOfRequiredParameters(), 'req') ?: array(),
);
}
if ($method
->getNumberOfParameters() != $method
->getNumberOfRequiredParameters()) {
$methods[] = array(
$method
->getName(),
array_fill(0, $method
->getNumberOfParameters(), 'all') ?: array(),
);
}
}
return $methods;
}