Page MenuHomePhabricator

Add a linter rule for curly brace array indexes
ClosedPublic

Authored by joshuaspence on Nov 30 2015, 11:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Thu, Dec 12, 5:41 AM
Unknown Object (File)
Sat, Dec 7, 1:30 PM
Unknown Object (File)
Thu, Dec 5, 11:39 AM
Unknown Object (File)
Nov 13 2024, 1:51 AM
Unknown Object (File)
Nov 11 2024, 6:16 AM
Unknown Object (File)
Nov 11 2024, 6:16 AM
Unknown Object (File)
Nov 10 2024, 8:01 AM
Subscribers

Details

Summary

In PHP, both $x['key'] and $x{'key'} can be used to access an array (see http://stackoverflow.com/questions/8092248/php-curly-braces-in-array-notation), but the former should be preferred.

Test Plan

Added test cases.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 9385
Build 11163: Run Core Tests
Build 11162: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for curly brace array indexes.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 30 2015, 1:08 PM
joshuaspence edited edge metadata.

Improve handling of nested indexes

This revision was automatically updated to reflect the committed changes.