You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods without a return value are shown with a return type of mixed.
If no return type hint specified, the documentation shows 'mixed' as type of the return value.
Above all, this is wrong for __construct() and __destruct(), which must never have a return value.
All setter methods, which usually also have no return value, are also affected.
Expected behavior
don't show any return type (or at least show void instead of mixed)
Actual behavior
return Type of mixed is shown
Steps to reproduce the problem
See at any constructor or destructor or function without return value.
I do see an improvement opportunity to check for various of the well-known magic methods such as construct and destruct; but for purely user-land implementations mixed is kind of the best option there is as phpDocumentor is unable to infer the return type. Assuming this is void is dangerous; as the method may actually return something. As such, mixed is the most accurate.
Methods without a return value are shown with a return type of
mixed
.If no return type hint specified, the documentation shows 'mixed' as type of the return value.
Above all, this is wrong for
__construct()
and__destruct()
, which must never have a return value.All setter methods, which usually also have no return value, are also affected.
Expected behavior
don't show any return type (or at least show
void
instead ofmixed
)Actual behavior
return Type of
mixed
is shownSteps to reproduce the problem
See at any constructor or destructor or function without return value.
Your environment
The text was updated successfully, but these errors were encountered: