@@ -4,7 +4,6 @@ |
||
4 | 4 | use gossi\codegen\generator\ModelGenerator; |
5 | 5 | use gossi\codegen\generator\utils\Writer; |
6 | 6 | use gossi\codegen\model\AbstractModel; |
7 | -use gossi\docblock\Docblock; |
|
8 | 7 | use gossi\codegen\config\CodeGeneratorConfig; |
9 | 8 | use gossi\codegen\model\DocblockInterface; |
10 | 9 |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use gossi\codegen\config\CodeFileGeneratorConfig; |
5 | 5 | use gossi\codegen\model\GenerateableInterface; |
6 | -use gossi\docblock\Docblock; |
|
7 | 6 | use phootwork\lang\Text; |
8 | 7 | |
9 | 8 | /** |
@@ -149,7 +149,6 @@ discard block |
||
149 | 149 | /** |
150 | 150 | * Remove a parameter at a given position |
151 | 151 | * |
152 | - * @param int|string|PhpParameter $position |
|
153 | 152 | * @return $this |
154 | 153 | */ |
155 | 154 | public function removeParameter($param) { |
@@ -170,6 +169,9 @@ discard block |
||
170 | 169 | $this->parameters = array_values($this->parameters); |
171 | 170 | } |
172 | 171 | |
172 | + /** |
|
173 | + * @param string $name |
|
174 | + */ |
|
173 | 175 | private function removeParameterByName($name) { |
174 | 176 | $position = null; |
175 | 177 | foreach ($this->parameters as $index => $param) { |
@@ -49,6 +49,9 @@ |
||
49 | 49 | return new static($name); |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param string $name |
|
54 | + */ |
|
52 | 55 | public function __construct($name) { |
53 | 56 | parent::__construct($name); |
54 | 57 | $this->initParameters(); |
@@ -22,7 +22,6 @@ |
||
22 | 22 | use gossi\codegen\model\parts\ParametersPart; |
23 | 23 | use gossi\codegen\model\parts\ReferenceReturnPart; |
24 | 24 | use gossi\codegen\model\parts\TypeDocblockGeneratorPart; |
25 | -use gossi\docblock\Docblock; |
|
26 | 25 | use gossi\docblock\tags\ReturnTag; |
27 | 26 | |
28 | 27 | /** |
@@ -3,6 +3,9 @@ discard block |
||
3 | 3 | |
4 | 4 | interface RoutineInterface { |
5 | 5 | |
6 | + /** |
|
7 | + * @return parts\ParametersPart |
|
8 | + */ |
|
6 | 9 | public function setParameters(array $parameters); |
7 | 10 | |
8 | 11 | /** |
@@ -66,7 +69,6 @@ discard block |
||
66 | 69 | /** |
67 | 70 | * Remove a parameter at a given position |
68 | 71 | * |
69 | - * @param int|string|PhpParameter $position |
|
70 | 72 | * @return $this |
71 | 73 | */ |
72 | 74 | public function removeParameter($param); |
@@ -17,6 +17,9 @@ |
||
17 | 17 | private $visitors; |
18 | 18 | private $filename; |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $filename |
|
22 | + */ |
|
20 | 23 | public function __construct($filename) { |
21 | 24 | $this->filename = $filename; |
22 | 25 | $this->visitors = new Set(); |
@@ -16,25 +16,58 @@ |
||
16 | 16 | |
17 | 17 | interface ParserVisitorInterface { |
18 | 18 | |
19 | + /** |
|
20 | + * @return void |
|
21 | + */ |
|
19 | 22 | public function visitStruct(ClassLike $node); |
20 | 23 | |
24 | + /** |
|
25 | + * @return void |
|
26 | + */ |
|
21 | 27 | public function visitClass(Class_ $node); |
22 | 28 | |
29 | + /** |
|
30 | + * @return void |
|
31 | + */ |
|
23 | 32 | public function visitInterface(Interface_ $node); |
24 | 33 | |
34 | + /** |
|
35 | + * @return void |
|
36 | + */ |
|
25 | 37 | public function visitTrait(Trait_ $node); |
26 | 38 | |
39 | + /** |
|
40 | + * @return void |
|
41 | + */ |
|
27 | 42 | public function visitTraitUse(TraitUse $node); |
28 | 43 | |
44 | + /** |
|
45 | + * @return void |
|
46 | + */ |
|
29 | 47 | public function visitConstants(ClassConst $node); |
30 | 48 | |
49 | + /** |
|
50 | + * @return void |
|
51 | + */ |
|
31 | 52 | public function visitConstant(Const_ $node, Doc $doc = null); |
32 | 53 | |
54 | + /** |
|
55 | + * @return void |
|
56 | + */ |
|
33 | 57 | public function visitProperty(Property $node); |
34 | 58 | |
59 | + /** |
|
60 | + * @return void |
|
61 | + */ |
|
35 | 62 | public function visitNamespace(Namespace_ $node); |
36 | 63 | |
64 | + /** |
|
65 | + * @return void |
|
66 | + */ |
|
37 | 67 | public function visitUseStatement(UseUse $node); |
38 | 68 | |
69 | + /** |
|
70 | + * @return void |
|
71 | + */ |
|
39 | 72 | public function visitMethod(ClassMethod $node); |
40 | 73 | } |
41 | 74 | \ No newline at end of file |
@@ -73,7 +73,7 @@ |
||
73 | 73 | * Returns the value from a node |
74 | 74 | * |
75 | 75 | * @param Node $node |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | private function getExpression(Node $node) { |
79 | 79 | if ($node instanceof ConstFetch) { |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use gossi\codegen\model\AbstractModel; |
5 | 5 | use gossi\codegen\model\RoutineInterface; |
6 | 6 | |
7 | -Trait RoutineBuilderPart { |
|
7 | +trait RoutineBuilderPart { |
|
8 | 8 | |
9 | 9 | use TypeBuilderPart; |
10 | 10 |