{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697","repository_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards","labels_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697/labels{/name}","comments_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697/comments","events_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697/events","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697","id":179899057,"number":697,"title":"PHPCS expecting the wrong number of tabs","user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-28T21:47:45Z","updated_at":"2016-09-28T23:06:04Z","closed_at":null,"body":"Given the following code:\r\n\r\n```\r\n<td>\r\n\t<?php if ( $key->lifetime ) {\r\n\t\techo 'Not applicable to lifetime subscriptions.';\r\n\t} ?>\r\n</td>\r\n```\r\n\r\nIf I run `phpcs --standard=WordPress-Core  example.php` I get the following error:\r\n\r\n```\r\nFOUND 1 ERROR AFFECTING 1 LINE\r\n----------------------------------------------------------------------\r\n 4 | ERROR | [x] Line indented incorrectly; expected 0 tabs, found 1\r\n----------------------------------------------------------------------\r\n```\r\n\r\nMaybe I'm missing something but it seems to me that the indentation of the code above is correct and PHPCS is mistakenly reporting an error."},"comment":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/comments/250327161","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697#issuecomment-250327161","issue_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/697","id":250327161,"user":{"login":"westonruter","id":134745,"avatar_url":"https://avatars.githubusercontent.com/u/134745?v=3","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T23:06:04Z","updated_at":"2016-09-28T23:06:04Z","body":"Try putting the `if` on the next line like:\r\n\r\n```php\r\n<td>\r\n    <?php\r\n    if ( $key->lifetime ) {\r\n        echo 'Not applicable to lifetime subscriptions.';\r\n    } \r\n    ?>\r\n</td>\r\n```\r\n\r\nOr better yet, use the alternate syntax for control structures since they are more template-taggy:\r\n\r\n```php\r\n<td>\r\n    <?php if ( $key->lifetime ) : ?>\r\n        Not applicable to lifetime subscriptions.\r\n    <?php endif; ?>\r\n</td>\r\n```"}}
{"actor":{"display_login":"westonruter"}}