Re: Warning for "confusable" types
| From: | Matteo Beccati | Date: | Mon, 14 Oct 2019 07:21:27 +0000 |
| Subject: | Re: Warning for "confusable" types | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107533@lists.php.net to get a copy of this message | ||
Hi Stas,
> Maybe we should just change the error message to this?> > must be an instance of the
> class "resource", but resource type is
given> > OTOH, since there are actually no resource type hints, and
naming your> class "resource" is an extremely bad idea, having a warning
there> wouldn't hurt too.
I was about to give my +1 on the more generic approach, but type hints
could also be interfaces and "instance of the class X" is not a good fit.
Cheers
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/