{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/520","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/520/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/520/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/520","id":63169282,"number":520,"title":"NewlineAfterOpenBrace being applied to PSR2 incorrectly.","user":{"login":"brianlmoon","id":49531,"avatar_url":"https://avatars.githubusercontent.com/u/49531?v=3","gravatar_id":"","url":"https://api.github.com/users/brianlmoon","html_url":"https://github.com/brianlmoon","followers_url":"https://api.github.com/users/brianlmoon/followers","following_url":"https://api.github.com/users/brianlmoon/following{/other_user}","gists_url":"https://api.github.com/users/brianlmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlmoon/subscriptions","organizations_url":"https://api.github.com/users/brianlmoon/orgs","repos_url":"https://api.github.com/users/brianlmoon/repos","events_url":"https://api.github.com/users/brianlmoon/events{/privacy}","received_events_url":"https://api.github.com/users/brianlmoon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/labels/Question","name":"Question","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-20T05:42:57Z","updated_at":"2015-05-01T10:28:17Z","closed_at":null,"body":"Hi,\r\n\r\nI have code like:\r\n```php\r\n        if ($log_errors || $display_errors) {\r\n\r\n            $error = array(\r\n                \"timestamp\" => $this->getTimestamp(),\r\n                \"message\" => $errstr,\r\n                \"errno\" => $errno,\r\n                \"source_file\" => $errfile,\r\n                \"source_line\" => $errline\r\n            );\r\n            // more and more code\r\n        }\r\n```\r\nOf cours phpcs complains with:\r\n```\r\nExpected 1 newline after opening brace; 2 found\r\n(Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace)\r\n```\r\nHowever, I can find nothing in the PSR1 or [PSR2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#5-control-structures) spec that says this is invalid."},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/98095185","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/520#issuecomment-98095185","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/520","id":98095185,"user":{"login":"mikehall314","id":1872237,"avatar_url":"https://avatars.githubusercontent.com/u/1872237?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehall314","html_url":"https://github.com/mikehall314","followers_url":"https://api.github.com/users/mikehall314/followers","following_url":"https://api.github.com/users/mikehall314/following{/other_user}","gists_url":"https://api.github.com/users/mikehall314/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehall314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehall314/subscriptions","organizations_url":"https://api.github.com/users/mikehall314/orgs","repos_url":"https://api.github.com/users/mikehall314/repos","events_url":"https://api.github.com/users/mikehall314/events{/privacy}","received_events_url":"https://api.github.com/users/mikehall314/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T10:28:17Z","updated_at":"2015-05-01T10:28:17Z","body":"Would section 2.3 cover this case? \"Blank lines MAY be added to improve readability and to indicate related blocks of code.\"?"}}