Ran
|
Files
81
|
Run time
5s
|
Badge
Embed ▾
README BADGES
|
travis-ci
:sparkles: PHP 7.1: New sniff to detect keys in list() > Support for keys in list() > > You can now specify keys in `list()`, or its new shorthand `[]` syntax. This enables destructuring of arrays with non-integer or non-sequential keys. Refs: * http://php.net/manual/en/migration71.new-features.php#migration71.new-features.support-for-keys-in-list * https://wiki.php.net/rfc/list_keys * https://github.com/php/php-src/commit/37c8bb586 Notes: * An error will be thrown for each double arrow encountered. The error will be linked to the double arrow token to provide the closest indication of where the list key was found. * The sniff has been set up to allow for easily extending it to re-use the logic to a) determine the open/close tokens and b) to check within a list construct. I already have another sniff lined up which needs the same logic. * Includes extensive unit tests. Fixes 252
3115 of 3349 relevant lines covered (93.01%)
5.91 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|