Ran
|
Jobs
6
|
Files
108
|
Run time
7min
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/PHPCompatibility/PHPCompatibility/commit/<a class=hub.com/PHPCompatibility/PHPCompatibility/commit/<a class="double-link" href="https://git"><a class=hub.com/PHPCompatibility/PHPCompatibility/commit/cdcc174460e60d702ac69a51c05f712c56966ce2">cdcc17446<a href="https://github.com/PHPCompatibility/PHPCompatibility/commit/cdcc174460e60d702ac69a51c05f712c56966ce2"><a href="https://github.com/PHPCompatibility/PHPCompatibility/commit/cdcc174460e60d702ac69a51c05f712c56966ce2">&quot;&gt;:sparkles: PHP 7.4: New RemovedCurlyBraceArrayAccess sniff &amp;gt; The array and string offset access syntax using curly braces is deprecated. &gt; Use $str[$idx] instead of $str{$idx}. Refs: * https://wiki.php.net/rfc/deprecate_curly_braces_array_access * https://github.com/php/php-src/blob/</a><a class="double-link" href="https://github.com/PHPCompatibility/PHPCompatibility/commit/<a class="double-link" href="https://github.com/PHPCompatibility/PHPCompatibility/commit/ef165b4422f4cef60f963833dddffa26fe1b2759">ef165b442</a>">ef165b442</a><a href="https://github.com/PHPCompatibility/PHPCompatibility/commit/cdcc174460e60d702ac69a51c05f712c56966ce2">/UPGRADING#L351-L353 * https://github.com/php/php-src/pull/4416 * https://github.com/php/php-src/commit/</a><a class="double-link" href="https://github.com/PHPCompatibility/PHPCompatibility/commit/<a class="double-link" href="https://github.com/PHPCompatibility/PHPCompatibility/commit/d574df63dc375f5fc9202ce5afde23f866b6450a">d574df63d</a>">d574df63d</a><a href="https://github.com/PHPCompatibility/PHPCompatibility/commit/cdcc174460e60d702ac69a51c05f712c56966ce2"> Based on a lot of testing, I have come to the conclusion that the curly braces for array access *only* worked when used on a variable/property. It never worked on constant arrays, function calls etc etc Note: * Verified that curly brace syntax never worked for function array string dereferencing. See https://3v4l.org/oWnqF * Verified that curly brace syntax never worked for function array dereferencing. See https://3v4l.org/g9jGG * Verified that curly brace syntax never worked for new class member access. See https://3v4l.org/9PkVW In contrast to any other PHPCompatibility sniff, this sniff contains an auto-fixer. For larger codebases, this issue can be quite time-consuming to fix, while fixing this automatically is trivial. This also makes this sniff a fully fledged alternative to the [migration script](https://gist.github.com/theodorejb/763b83a43522b0fc1755a537663b1863) provided by PHP itself. *Important*: At this moment, the PHPCompati... (continued)
3939 of 4201 relevant lines covered (93.76%)
33.6 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|