Skip to content

Commit 202b236

Browse files
gen_stub: documentation updates
* Use `@param` instead of `@var` for parameters * Fix type of `$attributeGroups` in `AttributeInfo::createFromGroups()` * Remove extra documentation of `$allConstInfo` for `ClassInfo::getClassSynopsisDocument()`, it is already documented under the correct name `$allConstInfos` * Remove unneeded `@throws`
1 parent ffb9c5e commit 202b236

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

build/gen_stub.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,6 @@ private function generateRefSect1(DOMDocument $doc, string $role): DOMElement {
16561656
return $refSec;
16571657
}
16581658

1659-
/**
1660-
* @throws Exception
1661-
*/
16621659
public function getMethodSynopsisDocument(): ?string {
16631660
$REFSEC1_SEPERATOR = "\n\n ";
16641661

@@ -2087,9 +2084,6 @@ private function getExampleSection(DOMDocument $doc, string $id): DOMElement {
20872084
return $refSec;
20882085
}
20892086

2090-
/**
2091-
* @throws Exception
2092-
*/
20932087
public function getMethodSynopsisElement(DOMDocument $doc): ?DOMElement {
20942088
if ($this->hasParamWithUnknownDefaultValue()) {
20952089
return null;
@@ -2411,7 +2405,7 @@ abstract class VariableLike
24112405
protected /* readonly */ ?ExposedDocComment $exposedDocComment;
24122406

24132407
/**
2414-
* @var AttributeInfo[] $attributes
2408+
* @param AttributeInfo[] $attributes
24152409
*/
24162410
public function __construct(
24172411
int $flags,
@@ -2594,7 +2588,7 @@ class ConstInfo extends VariableLike
25942588
private /* readonly */ bool $isFileCacheAllowed;
25952589

25962590
/**
2597-
* @var AttributeInfo[] $attributes
2591+
* @param AttributeInfo[] $attributes
25982592
*/
25992593
public function __construct(
26002594
AbstractConstName $name,
@@ -3048,7 +3042,7 @@ class PropertyInfo extends VariableLike
30483042
];
30493043

30503044
/**
3051-
* @var AttributeInfo[] $attributes
3045+
* @param AttributeInfo[] $attributes
30523046
*/
30533047
public function __construct(
30543048
PropertyName $name,
@@ -3346,7 +3340,7 @@ public function generateCode(string $invocation, string $nameSuffix, array $allC
33463340
}
33473341

33483342
/**
3349-
* @param array<int, array<int, AttributeGroup>> $attributeGroups
3343+
* @param AttributeGroup[] $attributeGroups
33503344
* @return AttributeInfo[]
33513345
*/
33523346
public static function createFromGroups(array $attributeGroups): array {
@@ -3706,7 +3700,6 @@ public function discardInfoForOldPhpVersions(?int $phpVersionIdMinimumCompatibil
37063700
/**
37073701
* @param array<string, ClassInfo> $classMap
37083702
* @param array<string, ConstInfo> $allConstInfos
3709-
* @param iterable<ConstInfo> $allConstInfo
37103703
*/
37113704
public function getClassSynopsisDocument(array $classMap, array $allConstInfos): ?string {
37123705
$doc = new DOMDocument();

0 commit comments

Comments
 (0)