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
F14035913: D14603.id35568.diff
Sun, Nov 10, 8:01 AM
F14035577: D14603.diff
Sun, Nov 10, 6:33 AM
F14026722: D14603.id35568.diff
Fri, Nov 8, 2:00 AM
F14026720: D14603.id.diff
Fri, Nov 8, 1:59 AM
F14005050: D14603.id35323.diff
Sun, Oct 27, 6:35 AM
F14004890: D14603.diff
Sun, Oct 27, 4:32 AM
F13985147: D14603.id35568.diff
Sun, Oct 20, 6:19 PM
F13978465: D14603.diff
Fri, Oct 18, 11:20 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.