mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
gen_stub: inline some single-use variables
This commit is contained in:
parent
39a6d6086e
commit
4861391501
1 changed files with 2 additions and 5 deletions
|
@ -710,9 +710,7 @@ class Type {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$type = $this->types[0];
|
$type = $this->types[0];
|
||||||
$name = $type->name;
|
$typeElement = $doc->createElement('type', $type->name);
|
||||||
|
|
||||||
$typeElement = $doc->createElement('type', $name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $typeElement;
|
return $typeElement;
|
||||||
|
@ -1937,9 +1935,8 @@ ENDCOMMENT
|
||||||
$returnDescriptionPara->appendChild(new DOMText("Description."));
|
$returnDescriptionPara->appendChild(new DOMText("Description."));
|
||||||
} else if (count($returnType->types) === 1) {
|
} else if (count($returnType->types) === 1) {
|
||||||
$type = $returnType->types[0];
|
$type = $returnType->types[0];
|
||||||
$name = $type->name;
|
|
||||||
|
|
||||||
switch ($name) {
|
switch ($type->name) {
|
||||||
case 'void':
|
case 'void':
|
||||||
$descriptionNode = $doc->createEntityReference('return.void');
|
$descriptionNode = $doc->createEntityReference('return.void');
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue