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
F19080915: D14603.id35323.diff
Tue, Dec 2, 3:25 AM
F19005769: D14603.id35323.diff
Nov 21 2025, 4:30 PM
F18835038: D14603.id35568.diff
Oct 26 2025, 12:49 PM
F18757311: D14603.diff
Oct 5 2025, 4:48 PM
F18712891: D14603.id.diff
Sep 29 2025, 5:34 AM
F18610216: D14603.diff
Sep 14 2025, 4:26 AM
F18588363: D14603.diff
Sep 12 2025, 12:01 AM
F18567863: D14603.diff
Sep 9 2025, 6:41 PM
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 9134
Build 10779: Run Core Tests
Build 10778: 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.