Add functions to echo parameter extension#143
Conversation
|
This is great. |
I checked the core files for |
|
Thank you. |
|
fyi @IanDelMar I just updated the extension and saw PHPStan reporting the invalid void usage usage of not sure how other functions behave there, but this one looks like a bug. |
👍🏻 Could you open a trac issue? |
|
I nearly mentioned this the other day but decided not to. The original intention of the return type extension for functions with an If we correct this, several functions will always return a string even when echo the_permalink();So do we go for 100% correctness or do we go for what's most useful for developers and continue to tell a little white lie about the return value depending on |
|
I live in a (forced) viktor utopia. |
Okay! Lets do this one with a sentence in README. |
|
my "problem" was that PHPStan started to tell me |
WordPress is a undecipherable mess. There are only wrong answers!
|
|
But you must say |
|
In a normal world (viktor utopia) there are different methods for each purpose. |
This also applies to |
|
I'm fine with a pragmatical approach here too. E.g. I'm gonna set the echo to false, as it should have been anyway, and at least I found this out now indirectly. Maybe we can just keep it as it is. Let's see if somebody else "complains" :) |
Adds the following functions to
EchoParameterDynamicFunctionReturnTypeExtension: