scramble
scramble copied to clipboard
No detection of return type
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.