Ran
|
Jobs
6
|
Files
97
|
Run time
6min
|
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
52 of 52 new or added lines in 2 files covered. (100.0%)
3578 of 3843 relevant lines covered (93.1%)
34.89 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
97.92 |
PHPCompatibility/Sniffs/Operators/RemovedTernaryAssociativitySniff.php |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|