This repository contains custom sniffs which are compatible with the PHP_CodeSniffer. Understand this package as a sniff pool which contains all needed custom sniffs for the various TYPO3 projects.
Create / Add a new sniff for array declaration like the TYPO3-CGL said: Arrays in TYPO3-CGL:
Array declarations use the "array" keyword in lowercase, with no blank between the keyword and the opening bracket. Thus:
$a = array();
array components are declared each on a separate line. Such lines are indented with one more tab than the start of the declaration. The closing bracket is on the same indentation level as the variable. Every line containing an array item ends with a comma. This may be omitted if there are no further elements, at the developer's choice. Example:
Create / Add a new sniff for array declaration like the TYPO3-CGL said: Arrays in TYPO3-CGL:
Array declarations use the "array" keyword in lowercase, with no blank between the keyword and the opening bracket. Thus:
array
components are declared each on a separate line. Such lines are indented with one more tab than the start of the declaration. The closing bracket is on the same indentation level as the variable. Every line containing an array item ends with a comma. This may be omitted if there are no further elements, at the developer's choice. Example:Nested arrays follow the same pattern. This formatting applies even to very small and simple array declarations, e.g.
Maybe Squiz.Arrays.ArrayDeclaration fits our needs.
Original tickets: