{"action":"created","issue":{"url":"https://api.github.com/repos/ofbeaton/granite/issues/13","labels_url":"https://api.github.com/repos/ofbeaton/granite/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ofbeaton/granite/issues/13/comments","events_url":"https://api.github.com/repos/ofbeaton/granite/issues/13/events","html_url":"https://github.com/ofbeaton/granite/issues/13","id":97532201,"number":13,"title":"Allow String concatenation over multiple lines but enforce the rest","user":{"login":"ofbeaton","id":1781089,"avatar_url":"https://avatars.githubusercontent.com/u/1781089?v=3","gravatar_id":"","url":"https://api.github.com/users/ofbeaton","html_url":"https://github.com/ofbeaton","followers_url":"https://api.github.com/users/ofbeaton/followers","following_url":"https://api.github.com/users/ofbeaton/following{/other_user}","gists_url":"https://api.github.com/users/ofbeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/ofbeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofbeaton/subscriptions","organizations_url":"https://api.github.com/users/ofbeaton/orgs","repos_url":"https://api.github.com/users/ofbeaton/repos","events_url":"https://api.github.com/users/ofbeaton/events{/privacy}","received_events_url":"https://api.github.com/users/ofbeaton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-27T19:04:32Z","updated_at":"2015-07-27T19:04:53Z","closed_at":null,"body":"It would be a cool enhancement if `Squiz.Strings.ConcatenationSpacing.PaddingFound` would allow newlines before or after a concat operator, as long as it was not alone on a line. That way things like:\r\n\r\n```php\r\n$myString = 'This is a really long string.'\r\n  .' It needs to be broken over many lines to observe PSR-2 120-char limit';\r\n\r\n// some may prefer this style\r\n$myString = 'This is a really long string.'.\r\n  ' It needs to be broken over many lines to observe PSR-2 120-char limit';\r\n```\r\n\r\nI am fully aware that I could this instead:\r\n```php\r\n$myString = 'This is a really long string.'.\r\n$myString = $myString.' It needs to be broken over many lines to observe PSR-2 120-char limit';\r\n```\r\n\r\nand there are tradeoffs to both, but just like I can split parameters over many lines, I should be able to split strings over many lines through the use of concatenation.\r\n\r\nThis was we could re-enable the sniff warning.\r\n\r\nReport it upstream and if they don't want to change it, implement our own sniff."},"comment":{"url":"https://api.github.com/repos/ofbeaton/granite/issues/comments/125307615","html_url":"https://github.com/ofbeaton/granite/issues/13#issuecomment-125307615","issue_url":"https://api.github.com/repos/ofbeaton/granite/issues/13","id":125307615,"user":{"login":"ofbeaton","id":1781089,"avatar_url":"https://avatars.githubusercontent.com/u/1781089?v=3","gravatar_id":"","url":"https://api.github.com/users/ofbeaton","html_url":"https://github.com/ofbeaton","followers_url":"https://api.github.com/users/ofbeaton/followers","following_url":"https://api.github.com/users/ofbeaton/following{/other_user}","gists_url":"https://api.github.com/users/ofbeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/ofbeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofbeaton/subscriptions","organizations_url":"https://api.github.com/users/ofbeaton/orgs","repos_url":"https://api.github.com/users/ofbeaton/repos","events_url":"https://api.github.com/users/ofbeaton/events{/privacy}","received_events_url":"https://api.github.com/users/ofbeaton/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T19:04:52Z","updated_at":"2015-07-27T19:04:52Z","body":"https://github.com/squizlabs/PHP_CodeSniffer/issues/651\r\nrequested enhancement upstream."}}