<?php

namespace Phamda\Builder;

use Phamda\Phamda;
use PhpParser\Node\Expr;

class SimpleMethodBuilder extends AbstractMethodBuilder
{
    const COMMENT_ROW_PREFIX = '     *';

    public function build()
    {
        return parent::build()->makeStatic();
    }

    protected function createComment()
    {
        $rows         = explode("\n", $this->source->getDocComment());
        $exampleStart = Phamda::findIndex(function ($row) { return strpos($row, '@') !== false; }, $rows);

        return implode("\n", array_merge(
            array_slice($rows, 0, $exampleStart),
            array_map(function ($row) {
                return self::COMMENT_ROW_PREFIX . ' ' . $row;
            }, (new CommentExampleBuilder($this->source))->getRows()),
            [self::COMMENT_ROW_PREFIX],
            array_slice($rows, $exampleStart)
        ));
    }
}

<?php

namespace Phamda\Builder;

use PhpParser\Node\Expr;

class SimpleMethodBuilder extends AbstractMethodBuilder
{
    const COMMENT_ROW_PREFIX = '     *';

    public function build()
    {
        return parent::build()->makeStatic();
    }

    protected function createComment()
    {
        $rows = explode("\n", $this->source->getDocComment());

        return implode("\n", array_merge(
            array_slice($rows, 0, 1),
            array_map(function ($row) {
                return self::COMMENT_ROW_PREFIX . ' ' . $row;
            }, (new CommentExampleBuilder($this->source))->getRows()),
            [self::COMMENT_ROW_PREFIX],
            array_slice($rows, 1)
        ));
    }
}

--- 
+++ 
@@ -2,6 +2,7 @@
 
 namespace Phamda\Builder;
 
+use Phamda\Phamda;
 use PhpParser\Node\Expr;
 
 class SimpleMethodBuilder extends AbstractMethodBuilder
@@ -15,15 +16,16 @@
 
     protected function createComment()
     {
-        $rows = explode("\n", $this->source->getDocComment());
+        $rows         = explode("\n", $this->source->getDocComment());
+        $exampleStart = Phamda::findIndex(function ($row) { return strpos($row, '@') !== false; }, $rows);
 
         return implode("\n", array_merge(
-            array_slice($rows, 0, 1),
+            array_slice($rows, 0, $exampleStart),
             array_map(function ($row) {
                 return self::COMMENT_ROW_PREFIX . ' ' . $row;
             }, (new CommentExampleBuilder($this->source))->getRows()),
             [self::COMMENT_ROW_PREFIX],
-            array_slice($rows, 1)
+            array_slice($rows, $exampleStart)
         ));
     }
 }
Add logic to handle function summaries
