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
I'm not going to claim the source PHP the tool was asked to deal with was good. Far from it, it was horrible. But the tool's output was worse in so far as it was invalid php.
(once the resulting php syntax error brought my attention to this bit of code, it was thoroughly re-written and no longer resembles... whatever you want to call the above. I'm filing this just in the hopes you can see an obvious fix and save others from bit of panic that sets in when a commit that was 100% automated tooling fails on a pre-commit hook as simple as a syntax check.)
The text was updated successfully, but these errors were encountered:
I'm not going to claim the source PHP the tool was asked to deal with was good. Far from it, it was horrible. But the tool's output was worse in so far as it was invalid php.
Input:
($arr[$opt] ? '1' : null) ?: '0'
Output:
($arr[$opt] ? '1' : null ?? '0'
The context around it: that line is an argument to a function being called.... something like this:
(once the resulting php syntax error brought my attention to this bit of code, it was thoroughly re-written and no longer resembles... whatever you want to call the above. I'm filing this just in the hopes you can see an obvious fix and save others from bit of panic that sets in when a commit that was 100% automated tooling fails on a pre-commit hook as simple as a syntax check.)
The text was updated successfully, but these errors were encountered: