/** * Get a Reflector and documentation for a function, class or instance, constant, method or property. * * @param string $valueName Function, class, variable, constant, method or property name. * @param bool $classOnly True if the name should only refer to a class, function or instance * * @return array (value, Reflector) */ protected function getTargetAndReflector($valueName, $classOnly = false) { list($value, $member, $kind) = $this->getTarget($valueName, $classOnly); return array($value, Mirror::get($value, $member, $kind)); }
/** * @expectedException \InvalidArgumentException * @dataProvider invalidArguments */ public function testMirrorThrowsInvalidArgumentExceptions($value) { Mirror::get($value); }
protected function presentSignature($target) { // This might get weird if the signature is actually for a reflector. Hrm. if (!$target instanceof \Reflector) { $target = Mirror::get($target); } return SignatureFormatter::format($target); }