File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -4238,15 +4238,14 @@ function parseDocComment(DocComment $comment): array {
42384238}
42394239
42404240class FramelessFunctionInfo {
4241- public int $arity;
4242- }
4241+ public /* readonly */ int $arity;
4242+
4243+ public function __construct(string $json) {
4244+ // FIXME: Should have some validation
4245+ $json = json_decode($json, true);
42434246
4244- function parseFramelessFunctionInfo(string $json): FramelessFunctionInfo {
4245- // FIXME: Should have some validation
4246- $json = json_decode($json, true);
4247- $framelessFunctionInfo = new FramelessFunctionInfo();
4248- $framelessFunctionInfo->arity = $json["arity"];
4249- return $framelessFunctionInfo;
4247+ $this->arity = $json["arity"];
4248+ }
42504249}
42514250
42524251function parseFunctionLike(
@@ -4330,7 +4329,7 @@ function parseFunctionLike(
43304329 break;
43314330
43324331 case 'frameless-function':
4333- $framelessFunctionInfos[] = parseFramelessFunctionInfo ($tag->getValue());
4332+ $framelessFunctionInfos[] = new FramelessFunctionInfo ($tag->getValue());
43344333 break;
43354334 }
43364335 }
You can’t perform that action at this time.
0 commit comments