Replace 'if' with 'switch' does not handle in_array
The suggestion to replace 'if' with 'switch', on an 'if' with 'in_array' does not appear and the developer must know replace 'in_array' with ... and apply it first; even after that, an extra invert 'if' statement may be required to enable replace 'if' with 'switch' on an 'if'!
Please sign in to leave a comment.
Could you please share a code sample where the intention fails to appear, together with the code you expect to get as the intention result?