/** * Returns if the paramter value can be passed by value. * * @return boolean */ public function canBePassedByValue() { return method_exists($this, 'canBePassedByValue') ? parent::canBePassedByValue() : !$this->isPassedByReference(); }
/** * 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()); }
/** * 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; }
/** * * @param ReflectionParameter $reflection * @return string */ protected static function getParameterDefaultValue(ReflectionParameter $reflection) { return $reflection->isOptional() ? $reflection->getDefaultValue() : ''; }