/** * @param \ReflectionMethod $reflection * @return MethodBlock */ public static function buildFromReflection(\ReflectionMethod $reflection) { $method = new self($reflection->getName()); $method->extractFromReflection($reflection); return $method; }
/** * @param \ReflectionProperty $reflection * @return PropertyBlock */ public static function buildFromReflection(\ReflectionProperty $reflection) { $property = new self($reflection->getName()); $property->extractFromReflection($reflection); // $property->setDefaultValue($reflection->getValue()); return $property; }