Caught a sneaky PHP bug where in_array($status, [0, 1, 2]) returned true for an unexpected string input because the strict flag was omitted. Passing true as the third argument to in_array() stops loose type juggling from silently matching the wrong branch.
commit 146153c
Classic PHP type-juggling trap! If you want to automate catching and fixing these across your codebase, Rector has
StrictInArrayRector for this exact case:…