{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/786","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/786/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/786/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/786/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/786","id":118591238,"number":786,"title":"Switch indent issue with short array notation","user":{"login":"odinuv","id":4319320,"avatar_url":"https://avatars.githubusercontent.com/u/4319320?v=3","gravatar_id":"","url":"https://api.github.com/users/odinuv","html_url":"https://github.com/odinuv","followers_url":"https://api.github.com/users/odinuv/followers","following_url":"https://api.github.com/users/odinuv/following{/other_user}","gists_url":"https://api.github.com/users/odinuv/gists{/gist_id}","starred_url":"https://api.github.com/users/odinuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinuv/subscriptions","organizations_url":"https://api.github.com/users/odinuv/orgs","repos_url":"https://api.github.com/users/odinuv/repos","events_url":"https://api.github.com/users/odinuv/events{/privacy}","received_events_url":"https://api.github.com/users/odinuv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/labels/Bug","name":"Bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-24T11:50:53Z","updated_at":"2015-11-25T16:43:27Z","closed_at":"2015-11-24T21:53:05Z","body":"<?php\r\nThe code:\r\n\r\n```\r\nswitch ($something) {\r\n    case 'value1':\r\n        $do;\r\n        return [\"message\" => $message];\r\n    case 'value2':\r\n        $do;\r\n        $do;\r\n        return [\"message\" => $message];\r\n    default:\r\n        \"dosomething\";\r\n}\r\n```\r\n\r\nProduces the following errors in PHPCS 2.4 (used to pass in 2.3.x):\r\n\r\n```\r\nD:\\wwwroot\\utils>phpcs --standard=psr2 testcs.php\r\n\r\nFILE: D:\\wwwroot\\utils\\testcs.php\r\n----------------------------------------------------------------------\r\nFOUND 5 ERRORS AFFECTING 5 LINES\r\n----------------------------------------------------------------------\r\n  7 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found\r\n    |       |     4\r\n  8 | ERROR | [x] Line indented incorrectly; expected at least 12\r\n    |       |     spaces, found 8\r\n  9 | ERROR | [x] Line indented incorrectly; expected at least 12\r\n    |       |     spaces, found 8\r\n 11 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found\r\n    |       |     4\r\n 12 | ERROR | [x] Line indented incorrectly; expected at least 12\r\n    |       |     spaces, found 8\r\n----------------------------------------------------------------------\r\nPHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY\r\n----------------------------------------------------------------------\r\n\r\nTime: 51ms; Memory: 3Mb\r\n```\r\n\r\nWhile this code passes without errors:\r\n```\r\n<?php\r\n\r\nswitch ($something) {\r\n    case 'value1':\r\n        $do;\r\n        return array('message' => $message);\r\n    case 'value2':\r\n        $do;\r\n        $do;\r\n        return array('message' => $message);\r\n    default:\r\n        \"dosomething\";\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/159667082","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/786#issuecomment-159667082","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/786","id":159667082,"user":{"login":"derrabus","id":1506493,"avatar_url":"https://avatars.githubusercontent.com/u/1506493?v=3","gravatar_id":"","url":"https://api.github.com/users/derrabus","html_url":"https://github.com/derrabus","followers_url":"https://api.github.com/users/derrabus/followers","following_url":"https://api.github.com/users/derrabus/following{/other_user}","gists_url":"https://api.github.com/users/derrabus/gists{/gist_id}","starred_url":"https://api.github.com/users/derrabus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derrabus/subscriptions","organizations_url":"https://api.github.com/users/derrabus/orgs","repos_url":"https://api.github.com/users/derrabus/repos","events_url":"https://api.github.com/users/derrabus/events{/privacy}","received_events_url":"https://api.github.com/users/derrabus/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T16:43:27Z","updated_at":"2015-11-25T16:43:27Z","body":"I've tested with the master branch and cannot reproduce this issue anymore. Thank you for the quick fix. :-)"}}