public getMethods ( integer $filter = null ) : |
||
$filter | integer | A filter mask |
return | Method reflection objects of the methods in this class |
public function getMethods($filter = null)
{
$extendedMethods = [];
$methods = $filter === null ? parent::getMethods() : parent::getMethods($filter);
foreach ($methods as $method) {
$extendedMethods[] = new MethodReflection($this->getName(), $method->getName());
}
return $extendedMethods;
}
/** * @test */ public function getMethodsReturnsArrayWithNumericIndex() { $class = new ClassReflection(__CLASS__); $methods = $class->getMethods(); foreach (array_keys($methods) as $key) { $this->assertInternalType('integer', $key, 'The index was not an integer.'); } }