scramble icon indicating copy to clipboard operation
scramble copied to clipboard

No detection of return type

Open zenire opened this issue 1 year ago • 5 comments

On my Eloquent model I've got a custom function like this:

public function userCount(): int
{
   return $this->users()->count();
}

As you can see the return type is int.

Next I've got a CompanyResource with:

[
   ...
   'userCount' => $this->userCount(),
   ...
]

I would expect Scramble to list "userCount": 0, however Scramble shows: "userCount": "string"

Scramble fails to detect and use the return type.

zenire avatar Jul 24 '24 11:07 zenire