Ran
|
Files
97
|
Run time
4s
|
Badge
Embed ▾
README BADGES
|
travis-ci
:sparkles: PHP 7.4/8.0: new RemovedTernaryAssociativity sniff PHP 7.4 deprecates nesting of ternaries without explicit use of parentheses. PHP 8.0 will remove the (left-)associativity of ternaries completely. This will become a compile-time error. Refs: * https://wiki.php.net/rfc/ternary_associativity * https://github.com/php/php-src/commit/09ea55cb4 (PHP 7.4 deprecation) * https://gist.github.com/nikic/b6214f87b0e4a7c6fe26919ac849194f Includes unit tests. To test this sniff, I have run it over some 200.000 files. While I can't say for sure whether there were any missed problem cases (false negatives), all the issues detected by the sniff were actual cases of nested ternaries which would become problematic in PHP 7.4/8.0. Related to 808
3557 of 3947 relevant lines covered (90.12%)
6.3 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|