Exemplo n.º 1
0
 /**
  * @param DocBlock $docblock
  * @param $wrapLength
  * @return string
  */
 private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength)
 {
     $text = $docblock->getSummary() . "\n\n" . $docblock->getDescription();
     if ($wrapLength !== null) {
         $text = wordwrap($text, $wrapLength);
         return $text;
     }
     return $text;
 }
Exemplo n.º 2
0
 /**
  * @covers ::__construct
  * @covers ::getSummary
  *
  * @uses \phpDocumentor\Reflection\DocBlock\Description
  */
 public function testDocBlockCanHaveASummary()
 {
     $summary = 'This is a summary';
     $fixture = new DocBlock($summary);
     $this->assertSame($summary, $fixture->getSummary());
 }