Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce multi-line String Concat Spacing #20

Open
ofbeaton opened this issue Aug 20, 2015 · 0 comments
Open

Enforce multi-line String Concat Spacing #20

ofbeaton opened this issue Aug 20, 2015 · 0 comments

Comments

@ofbeaton
Copy link
Owner

This should be the only valid case:

function myfunc()
{
   $myString = 'This is a really long string.'
      .' It needs to be broken over many lines to observe PSR-2 120-char limit';
}

This is already invalid:

function myfunc()
{
   $myString = 'This is a really long string.'
.' It needs to be broken over many lines to observe PSR-2 120-char limit';
}

The following 2 are currently valid but should not be:

function myfunc()
{
   $myString = 'This is a really long string.'
   .' It needs to be broken over many lines to observe PSR-2 120-char limit';
}
function myfunc()
{
   $myString = 'This is a really long string.'
         .' It needs to be broken over many lines to observe PSR-2 120-char limit';
}

We would need to make our own concat sniff that enforced this.

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

No branches or pull requests

1 participant