Reputation: 9335
Json-like structures are quite common in php applications that deal some sort of json api. The precise type of such a structure is recursive:
/**
* @return null|scalar|array< null|scalar|array< null|scalar|array< ... >>>
*/
public function normalize(): null|scalar|array
{
...
}
Is there any way to represent this recursive type so that phpstan understands it?
Upvotes: 0
Views: 50