Skip to content

Commit e3ab713

Browse files
committed
Generate stubs for WordPress 4.7.23
1 parent d87bf8e commit e3ab713

File tree

3 files changed

+81947
-110600
lines changed

3 files changed

+81947
-110600
lines changed

source/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"ext-mbstring": "*",
88
"ext-openssl": "*",
99
"ext-sodium": "*",
10-
"johnpbloch/wordpress": "5.9.1"
10+
"johnpbloch/wordpress": "4.7.23"
1111
},
1212
"minimum-stability": "stable",
1313
"config": {

visitor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,18 @@ private function addArrayHashNotation(Doc $docComment): ?Doc
109109
$additions = [];
110110

111111
foreach ($params as $param) {
112+
if (! $param instanceof Param) {
113+
continue;
114+
}
115+
112116
$addition = $this->getAdditionFromParam($param);
113117

114118
if ($addition !== null) {
115119
$additions[] = $addition;
116120
}
117121
}
118122

119-
if ($returns) {
123+
if ($returns !== [] && $returns[0] instanceof Return_) {
120124
$addition = $this->getAdditionFromReturn($returns[0]);
121125

122126
if ($addition !== null) {

0 commit comments

Comments
 (0)