gossi\codegen\model\PhpMethod::generateDocblock PHP Method

generateDocblock() public method

Generates docblock based on provided information
public generateDocblock ( )
    public function generateDocblock()
    {
        $docblock = $this->getDocblock();
        $docblock->setShortDescription($this->getDescription());
        $docblock->setLongDescription($this->getLongDescription());
        // return tag
        $this->generateTypeTag(new ReturnTag());
        // param tags
        $this->generateParamDocblock();
    }

Usage Example

 public function testEmptyMethod()
 {
     $method = new PhpMethod(self::METHOD);
     $method->generateDocblock();
     $this->assertTrue($method->getDocblock()->isEmpty());
 }