{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719","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/719/labels{/name}","comments_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719/comments","events_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719/events","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719","id":193118509,"number":719,"title":"Warning for translate triggers class function","user":{"login":"thomasplevy","id":1290739,"avatar_url":"https://avatars.githubusercontent.com/u/1290739?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasplevy","html_url":"https://github.com/thomasplevy","followers_url":"https://api.github.com/users/thomasplevy/followers","following_url":"https://api.github.com/users/thomasplevy/following{/other_user}","gists_url":"https://api.github.com/users/thomasplevy/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasplevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasplevy/subscriptions","organizations_url":"https://api.github.com/users/thomasplevy/orgs","repos_url":"https://api.github.com/users/thomasplevy/repos","events_url":"https://api.github.com/users/thomasplevy/events{/privacy}","received_events_url":"https://api.github.com/users/thomasplevy/received_events","type":"User","site_admin":false},"labels":[{"id":197939651,"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/labels/Type:%20Bug","name":"Type: Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-02T13:40:32Z","updated_at":"2016-12-03T14:47:10Z","closed_at":null,"body":"I have a class function in my plugin:\r\n\r\n`\r\nabstract class myclass { \r\n     public function translate( $key ) {}\r\n}\r\n`\r\n\r\nThis function doesn't do anything by default, but allows extending classes to pull a database value by $key and translate it. The extending classes ultimately run through some WP core i18n function like `__()`\r\n\r\nDuring PHPCS runs this function triggers the i18nSniff error: The $text arg should be single a string literal, not \"$key\".\r\n\r\nI see that some sniffs -- the \"DontExtract\" for example -- seem to allow this pattern, but this translate function doesn't follow the pattern\r\n\r\nI tried to figure out how to rewrite the tests to allow for this exception to submit a PR but after some digging and attempts I decided I am not qualified to do so. Sorry...\r\n\r\nThanks,"},"comment":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/comments/264643422","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719#issuecomment-264643422","issue_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/719","id":264643422,"user":{"login":"thomasplevy","id":1290739,"avatar_url":"https://avatars.githubusercontent.com/u/1290739?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasplevy","html_url":"https://github.com/thomasplevy","followers_url":"https://api.github.com/users/thomasplevy/followers","following_url":"https://api.github.com/users/thomasplevy/following{/other_user}","gists_url":"https://api.github.com/users/thomasplevy/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasplevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasplevy/subscriptions","organizations_url":"https://api.github.com/users/thomasplevy/orgs","repos_url":"https://api.github.com/users/thomasplevy/repos","events_url":"https://api.github.com/users/thomasplevy/events{/privacy}","received_events_url":"https://api.github.com/users/thomasplevy/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T14:47:10Z","updated_at":"2016-12-03T14:47:10Z","body":"@GaryJones \r\n\r\nThe function doesn't actually look like that anywhere in the codebase, just gave a simply one-liner as an example\r\n\r\nThe actual function in the abstract is:\r\n\r\n`\r\npublic function translate( $key ) {\r\n     return '';\r\n}"}}
{"actor":{"display_login":"thomasplevy"}}