Ejemplo n.º 1
0
 /**
  * @see Patgod85\Phpdoc2rst\Command\Process\Element.Element::__toString()
  */
 public function __toString()
 {
     $string = '';
     if ($this->reflection->getDocComment()) {
         $string = sprintf(".. php:const:: %s\n\n", $this->reflection->getName());
         $parser = $this->getParser();
         if ($parser->hasDescription()) {
             $description = $parser->getDescription();
             if ($description) {
                 $string .= "\n\n";
                 $string .= $this->indent($description, 4);
             }
         }
     }
     return $string;
 }
Ejemplo n.º 2
0
 /**
  * @param IReflectionConstant $constant
  *
  * @return string
  */
 public function writeElement(IReflectionConstant $constant)
 {
     return $this->formatLine('+{static}' . $constant->getName() . ' = ' . $this->formatValue($constant->getValue()));
 }