/** * Returns function parameters. * * @return array */ public function getParameters() { if (null === $this->parameters) { $broker = $this->broker; $parent = $this; $this->parameters = array_map(function (InternalReflectionParameter $parameter) use($broker, $parent) { return ReflectionParameter::create($parameter, $broker, $parent); }, parent::getParameters()); } return $this->parameters; }
/** * Tests an exception thrown when trying to create the reflection from a PHP internal reflection. * * @expectedException \TokenReflection\Exception\RuntimeException */ public function testInternalParameterReflectionCreate() { Php\ReflectionParameter::create(new \ReflectionClass('Exception'), $this->getBroker()); }