@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Sets the description, which will also be used when generating a docblock |
72 | 72 | * |
73 | - * @param string|array $description |
|
73 | + * @param string $description |
|
74 | 74 | * @return $this |
75 | 75 | */ |
76 | 76 | public function setDescription($description) { |
@@ -7,8 +7,14 @@ |
||
7 | 7 | |
8 | 8 | private $interfaces = []; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $qualifiedName |
|
12 | + */ |
|
10 | 13 | abstract public function addUseStatement($qualifiedName, $alias = null); |
11 | 14 | |
15 | + /** |
|
16 | + * @param string $qualifiedName |
|
17 | + */ |
|
12 | 18 | abstract public function removeUseStatement($qualifiedName); |
13 | 19 | |
14 | 20 | abstract public function getNamespace(); |
@@ -7,8 +7,14 @@ discard block |
||
7 | 7 | |
8 | 8 | private $traits = []; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $qualifiedName |
|
12 | + */ |
|
10 | 13 | abstract public function addUseStatement($qualifiedName, $alias = null); |
11 | 14 | |
15 | + /** |
|
16 | + * @param string $qualifiedName |
|
17 | + */ |
|
12 | 18 | abstract public function removeUseStatement($qualifiedName); |
13 | 19 | |
14 | 20 | abstract public function getNamespace(); |
@@ -19,7 +25,7 @@ discard block |
||
19 | 25 | * If the trait is passed as PhpTrait object, |
20 | 26 | * the trait is also added as use statement. |
21 | 27 | * |
22 | - * @param PhpTrait|string $trait trait or qualified name |
|
28 | + * @param PhpTrait $trait trait or qualified name |
|
23 | 29 | * @return $this |
24 | 30 | */ |
25 | 31 | public function addTrait($trait) { |
@@ -263,6 +263,9 @@ |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | |
266 | + /** |
|
267 | + * @return string |
|
268 | + */ |
|
266 | 269 | private function getVisibility(Node $node) { |
267 | 270 | if ($node->isPrivate()) { |
268 | 271 | return AbstractPhpMember::VISIBILITY_PRIVATE; |
@@ -14,7 +14,6 @@ |
||
14 | 14 | /** |
15 | 15 | * Adds a constant |
16 | 16 | * |
17 | - * @param string|PhpConstant $name constant name or instance |
|
18 | 17 | * @param string $value |
19 | 18 | * @return $this |
20 | 19 | */ |
@@ -163,6 +163,9 @@ discard block |
||
163 | 163 | return $this->constantSortFunc ? : 'strcasecmp'; |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @return callable |
|
168 | + */ |
|
166 | 169 | private function getUseSortFunc() { |
167 | 170 | if (null !== $this->useStatementSortFunc) { |
168 | 171 | return $this->useStatemenentSortFunc; |
@@ -203,6 +206,9 @@ discard block |
||
203 | 206 | return self::$defaultUseStatementSortFunc; |
204 | 207 | } |
205 | 208 | |
209 | + /** |
|
210 | + * @return callable |
|
211 | + */ |
|
206 | 212 | private function getMethodSortFunc() { |
207 | 213 | if (null !== $this->methodSortFunc) { |
208 | 214 | return $this->methodSortFunc; |
@@ -228,6 +234,9 @@ discard block |
||
228 | 234 | return self::$defaultMethodSortFunc; |
229 | 235 | } |
230 | 236 | |
237 | + /** |
|
238 | + * @return callable |
|
239 | + */ |
|
231 | 240 | private function getPropertySortFunc() { |
232 | 241 | if (null !== $this->propertySortFunc) { |
233 | 242 | return $this->propertySortFunc; |
@@ -357,6 +357,9 @@ |
||
357 | 357 | } |
358 | 358 | } |
359 | 359 | |
360 | + /** |
|
361 | + * @param string $type |
|
362 | + */ |
|
360 | 363 | protected function writeFunctionReturnType($type) { |
361 | 364 | if ($this->config->getGenerateReturnTypeHints() && $type != NULL && false === strpos($type, '|')) { |
362 | 365 | $this->writer->write(': ')->write($type); |