Add FilterVarArrayDynamicReturnTypeExtension#2257
Add FilterVarArrayDynamicReturnTypeExtension#2257ondrejmirtes merged 7 commits intophpstan:1.10.xfrom zonuexe:feature/improve-filter_var_array
FilterVarArrayDynamicReturnTypeExtension#2257Conversation
FilterVarArrayDynamicReturnTypeExtension
|
I was hoping it might be possible to reuse that thing, but didn't plan it through :) feel also free to change it if needed. Reminds me that I also still need to finish filter_input.. |
|
Since the processing for |
|
I started the filter_input support via #2010 but this is not the latest state and I wasn't happy yet with the local refactor. Will try to push it soon. |
|
@herndlm |
|
This pull request has been marked as ready for review. |
|
I intended to implement |
|
a missing interesting test case for
I handled this incorrectly in #2010 initially but added a new method in the helper now that should deal with this and maybe you can make use of it here too. |
|
hi @zonuexe, the filter_input stuff has been merged, maybe it is useful here in some way |
|
@herndlm Thanks for the reminder! |
This reverts commit 862b01f7595d23d1c92c1836a5bbe99e3588211b.
|
@ondrejmirtes Could you please review this PR? |
|
Thank you! |
Add a return type extension for
filter_var_array()andfilter_input_array().This function is defined with the following signature:
This function supports three types of filters:
The array keys returned from
filter_var_array()change depending on how the filter is passed, so the implementation is complex.$options$array$arrayThis PR was implemented thanks to @herndlm's
FilterFunctionReturnTypeHelper#2190 and #2010.