1 | <?php declare(strict_types=1); |
||
31 | use TypeDocblockGeneratorPart; |
||
32 | use ValuePart; |
||
33 | |||
34 | /** |
||
35 | * Creates a new PHP property |
||
36 | * |
||
37 | * @param string $name the properties name |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | public static function create(string $name): static { |
||
|
|||
42 | 16 | return new static($name); |
|
43 | 16 | } |
|
44 | |||
45 | /** |
||
46 | * Generates docblock based on provided information |
||
47 | */ |
||
48 | public function generateDocblock(): void { |
||
49 | 7 | $docblock = $this->getDocblock(); |
|
50 | 7 | $docblock->setShortDescription($this->getDescription()); |
|
51 | 7 | $docblock->setLongDescription($this->getLongDescription()); |
|
52 | 7 | ||
53 | // var tag |
||
54 | $this->generateTypeTag(new VarTag()); |
||
55 | 7 | } |
|
56 | } |
||
57 |