Zephir\Stubs\Generator::buildConstant PHP Method

buildConstant() protected method

protected buildConstant ( Zephir\ClassConstant $constant, string $indent ) : string
$constant Zephir\ClassConstant
$indent string
return string
    protected function buildConstant(ClassConstant $constant, $indent)
    {
        $source = 'const ' . $constant->getName();
        $value = $this->wrapPHPValue(array('default' => $constant->getValue()));
        $docBlock = new DocBlock($constant->getDocBlock(), $indent);
        return $docBlock . "\n" . $indent . $source . ' = ' . $value . ';';
    }