{"action":"closed","issue":{"url":"https://api.github.com/repos/ovr/phpsa/issues/165","repository_url":"https://api.github.com/repos/ovr/phpsa","labels_url":"https://api.github.com/repos/ovr/phpsa/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/ovr/phpsa/issues/165/comments","events_url":"https://api.github.com/repos/ovr/phpsa/issues/165/events","html_url":"https://github.com/ovr/phpsa/issues/165","id":180883581,"number":165,"title":"[Analyzer] One Property definition per line","user":{"login":"ddmler","id":510150,"avatar_url":"https://avatars.githubusercontent.com/u/510150?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmler","html_url":"https://github.com/ddmler","followers_url":"https://api.github.com/users/ddmler/followers","following_url":"https://api.github.com/users/ddmler/following{/other_user}","gists_url":"https://api.github.com/users/ddmler/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmler/subscriptions","organizations_url":"https://api.github.com/users/ddmler/orgs","repos_url":"https://api.github.com/users/ddmler/repos","events_url":"https://api.github.com/users/ddmler/events{/privacy}","received_events_url":"https://api.github.com/users/ddmler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ovr/phpsa/labels/analyzer","name":"analyzer","color":"1d76db"},{"url":"https://api.github.com/repos/ovr/phpsa/labels/hacktoberfest","name":"hacktoberfest","color":"0052cc"},{"url":"https://api.github.com/repos/ovr/phpsa/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-04T12:48:19Z","updated_at":"2016-10-04T20:14:19Z","closed_at":"2016-10-04T20:14:19Z","body":"It notices on: `public $a, $b=1;` or something like that.\r\nSo we need a statement analyzer for Property Node.\r\nIt's very easy, so it's good for someone who is new to the project.\r\n\r\nHow to do it:\r\n1. Create Analyzer (you can use this one as a template: https://github.com/ovr/phpsa/blob/master/src/Analyzer/Pass/Statement/DoNotUseGoto.php )\r\nand register it to Stmt\\Property. Now:\r\nCheck that `$stmt->props` (array) contains more than one entry. If yes write a nice notice message, else return false.\r\n2. Add it to PHPSA\\Analyzer\\Factory (registerStatementPasses)\r\n3. Write Tests (analyze-fixtures directory): One example with one property and one with 2 or more (again look at the existing ones for statements)\r\n\r\nCheck our Contribution Guide and create a pull request.\r\nThanks :cake:"}}
{"actor":{"display_login":"ddmler"}}