|
@@ -157,16 +157,20 @@ class LuDocBusiness
|
157
|
157
|
|
158
|
158
|
$parameters = [];
|
159
|
159
|
foreach ($reflection->getParameters() as $param) {
|
160
|
|
- $p["name"] = $param->getName();
|
|
160
|
+ $p = [];
|
161
|
161
|
|
162
|
162
|
if (!is_null($docParser) && isset($docParser->all_params[$param->getName()])) {
|
163
|
163
|
$p = $docParser->all_params[$param->getName()];
|
164
|
|
- $p["annotations"] = "";
|
165
|
164
|
}
|
166
|
165
|
else {
|
167
|
166
|
$p["description"] = "No description available";
|
168
|
167
|
$p["type"] = "Unknown";
|
169
|
|
- $p["annotations"] = "";
|
|
168
|
+ }
|
|
169
|
+ $p["name"] = $param->getName();
|
|
170
|
+ $p["annotations"] = "";
|
|
171
|
+
|
|
172
|
+ if ($param->isOptional()) {
|
|
173
|
+ $p["annotations"] = "Optional. Default value: " . $param->getDefaultValue();
|
170
|
174
|
}
|
171
|
175
|
|
172
|
176
|
$parameters[] = $p;
|