Closed tienvx closed 8 months ago
The issue with this is that it's not static. Is this IDE specific, and if so, would some IDE-specific annotation or work-around not work better for this?
In this case, self seems like the right type, but thinking very hard, perhaps static means something else as a return type. Late-static bound perhaps?
Is this IDE specific
Yes
In this case, self seems like the right type, but thinking very hard, perhaps static means something else as a return type. Late-static bound perhaps?
I simply use this feature from PHP 8.0
https://php.watch/versions/8.0/static-return-type
would some IDE-specific annotation or work-around not work better for this?
According to the link above, I think @return static
also can do it.
returning UrlInterface
will also work without static for this. Approved, but this really is not what the linked article describes at all.
returning UrlInterface will also work without static for this.
I replaced self
by UrlInterface
and it doesn't work.
Any way, I will close this PR for now and focus on writing more tests which is more important.