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
{{ message }}
Repository navigation
auto-fix "Call to function in_array() requires parameter #3 to be set/true." #347
if we know native haystack and needle types for a in_array, array_keys or array_search call, it would be great we could fix add a true as 3rd parameter in case its missing or can always be true. we should only fix when haystacks' iterable type is a super type of needle (strict comparison). the fixer must not change calls where equivalence cannot be proven.
For array_keys(), only consider calls with at least two arguments, since the strictness flag matters only when a search value is supplied. Calls without a search value should remain unchanged.
The rule also reports calls to other functions, such as base64_decode(). Those calls should not be made fixable by this change.
changed the title [-]auto-fix "Call to function in_array() requires parameter #3 to be set."[/-][+]auto-fix "Call to function in_array() requires parameter #3 to be true."[/+]on Nov 3, 2026
changed the title [-]auto-fix "Call to function in_array() requires parameter #3 to be true."[/-][+]auto-fix "Call to function in_array() requires parameter #3 to be set/true."[/+]on Nov 3, 2026
Activity
[-]auto-fix "Call to function in_array() requires parameter #3 to be set."[/-][+]auto-fix "Call to function in_array() requires parameter #3 to be true."[/+][-]auto-fix "Call to function in_array() requires parameter #3 to be true."[/-][+]auto-fix "Call to function in_array() requires parameter #3 to be set/true."[/+]