Skip to content

Coding standards: arrays #758

Closed
Closed
@tzyganu

Description

@tzyganu

I've gone through the coding standards document (that by the ways it's very well wrtitten 😄 Thanks for this. ), but I didn't find anything regarding the array declaration format.
Since Magento 2 will support php 5.4+ we can use the clasic form $a = array(1,2,3) or the short form $a = [1,2,3]. I see in the code that both forms are used.

I actually have 2 questions here:

  • Is this going to be standardized? (I know it's not that easy)
  • What format do you encourage developers to use? (or is "use them as you like them"?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions