Konafets / TYPO3SniffPool

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.
21 stars 10 forks source link

CGL change for multiline string concatenation #36

Closed NeoBlack closed 9 years ago

NeoBlack commented 9 years ago

The CGL changed for multiline string concatenation, the operator should now be at the begin of the line and not at the end. both versions are allowed. For more information please see:

http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/PhpSyntaxFormatting/Index.html#strings

I think the ruleset should throw a warning for operator at the end and nothing for operator at the begin.

Konafets commented 9 years ago

Sorry, but I read there

The line concatenation operator must be at the end of the line.

NeoBlack commented 9 years ago

Sorry, my mistake, wrong link: http://docs.typo3.org/typo3cms/CodingGuidelinesReference/latest/PhpFileFormatting/PhpSyntaxFormatting/#strings

We changed the CGL some days ago.

Konafets commented 9 years ago

Is the new rule valid for 6.2 or 7.0?

NeoBlack commented 9 years ago

The change was merged into latest and not into 6.2. We will not made CGL changes in 6.2. But in case of a backport from master to 6.2 branch we will not change the operator position back to the end. Both variants are valid. If you have different ruleset, then add it only to 7.x or latest. I think no developer will switch the ruleset and ever use the latest version ;)

NeoBlack commented 9 years ago

nice, thank you!