{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1772","repository_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1772/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1772/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1772/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/1772","id":280212283,"number":1772,"title":"Difference in DisallowSpaceIndentSniff between 3.1.1 and master","user":{"login":"PatrickRose","id":1681612,"avatar_url":"https://avatars1.githubusercontent.com/u/1681612?v=4","gravatar_id":"","url":"https://api.github.com/users/PatrickRose","html_url":"https://github.com/PatrickRose","followers_url":"https://api.github.com/users/PatrickRose/followers","following_url":"https://api.github.com/users/PatrickRose/following{/other_user}","gists_url":"https://api.github.com/users/PatrickRose/gists{/gist_id}","starred_url":"https://api.github.com/users/PatrickRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PatrickRose/subscriptions","organizations_url":"https://api.github.com/users/PatrickRose/orgs","repos_url":"https://api.github.com/users/PatrickRose/repos","events_url":"https://api.github.com/users/PatrickRose/events{/privacy}","received_events_url":"https://api.github.com/users/PatrickRose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-07T17:22:44Z","updated_at":"2017-12-08T02:21:18Z","closed_at":null,"author_association":"NONE","body":"With the following file (tabs indentation), there's a difference between 3.1.1 and master\r\n\r\n```php\r\n<?php\r\n\r\nclass Example\r\n{\r\n\t\r\n\t/**\r\n\t *\r\n\t */\r\n\tpublic function exampleFunction()\r\n\t{\r\n\t\t//\r\n\t}\r\n\r\n}\r\n```\r\n\r\nIn 3.1.1. you get:\r\n\r\n```\r\n$ phpcs --sniffs=Generic.WhiteSpace.DisallowSpaceIndent tmp.php\r\n\r\n$\r\n```\r\n\r\nIn master:\r\n```\r\n$ phpcs --sniffs=Generic.WhiteSpace.DisallowSpaceIndent tmp.php\r\n\r\nFILE: /srv/www/zedcore/prose.trac-php7.zcode.net/tmp.php\r\n---------------------------------------------------------------------------\r\nFOUND 2 ERRORS AFFECTING 2 LINES\r\n---------------------------------------------------------------------------\r\n 7 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed\r\n 8 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed\r\n---------------------------------------------------------------------------\r\nPHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY\r\n---------------------------------------------------------------------------\r\n\r\nTime: 101ms; Memory: 8Mb\r\n\r\n$\r\n```\r\n\r\nI think 3.1.1 acts correctly. I haven't bisected down to try and work out where it changed behaviour."},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/350153527","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/1772#issuecomment-350153527","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/1772","id":350153527,"user":{"login":"gsherwood","id":185976,"avatar_url":"https://avatars2.githubusercontent.com/u/185976?v=4","gravatar_id":"","url":"https://api.github.com/users/gsherwood","html_url":"https://github.com/gsherwood","followers_url":"https://api.github.com/users/gsherwood/followers","following_url":"https://api.github.com/users/gsherwood/following{/other_user}","gists_url":"https://api.github.com/users/gsherwood/gists{/gist_id}","starred_url":"https://api.github.com/users/gsherwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsherwood/subscriptions","organizations_url":"https://api.github.com/users/gsherwood/orgs","repos_url":"https://api.github.com/users/gsherwood/repos","events_url":"https://api.github.com/users/gsherwood/events{/privacy}","received_events_url":"https://api.github.com/users/gsherwood/received_events","type":"User","site_admin":false},"created_at":"2017-12-08T02:21:18Z","updated_at":"2017-12-08T02:21:18Z","author_association":"OWNER","body":"Ah, I see it. `$expectedIndentSize` is new, and is using the token length from the array. But if you aren't replacing tabs with spaces, then the length is the number of chars (counting a tab as one char) and that throws everything off."}}
{"actor":{"display_login":"gsherwood"}}