Pop\Code\Generator\DocblockGenerator::factory PHP Метод

factory() публичный статический Метод

Static method to instantiate the docblock object and return itself to facilitate chaining methods together.
public static factory ( string $desc = null, string $indent = null ) : DocblockGenerator
$desc string
$indent string
Результат DocblockGenerator
    public static function factory($desc = null, $indent = null)
    {
        return new self($desc, $indent);
    }

Usage Example

Пример #1
0
 public function testSetAndGetReturn()
 {
     $d = DocblockGenerator::factory('This is the description');
     $d->setReturn('void');
     $r = $d->getReturn();
     $this->assertEquals('void', $r['type']);
 }