{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/zephir/issues/837","labels_url":"https://api.github.com/repos/phalcon/zephir/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/zephir/issues/837/comments","events_url":"https://api.github.com/repos/phalcon/zephir/issues/837/events","html_url":"https://github.com/phalcon/zephir/issues/837","id":63665785,"number":837,"title":"Type for class properties","user":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/zephir/labels/discussion","name":"discussion","color":"009800"},{"url":"https://api.github.com/repos/phalcon/zephir/labels/NFR","name":"NFR","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-23T08:49:14Z","updated_at":"2015-03-23T09:25:33Z","closed_at":null,"body":"I suggest to add types for class properties\r\n\r\nIt gains:\r\n\r\n* `@param` docblocks for getter/setters\r\n* Type control for parameter in set method\r\n* Static analysis\r\n\r\n```zep\r\nnamespace Test;\r\n\r\n\r\nclass Application {\r\n    property <Di> di {get, set};\r\n\r\n    /**\r\n     * Optional?\r\n     */\r\n    property <Request> {get, set = null};\r\n}\r\n```\r\n\r\nAnd require and optional \r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9899659-type-for-class-properties?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/phalcon/zephir/issues/comments/84910025","html_url":"https://github.com/phalcon/zephir/issues/837#issuecomment-84910025","issue_url":"https://api.github.com/repos/phalcon/zephir/issues/837","id":84910025,"user":{"login":"golovanov","id":363810,"avatar_url":"https://avatars.githubusercontent.com/u/363810?v=3","gravatar_id":"","url":"https://api.github.com/users/golovanov","html_url":"https://github.com/golovanov","followers_url":"https://api.github.com/users/golovanov/followers","following_url":"https://api.github.com/users/golovanov/following{/other_user}","gists_url":"https://api.github.com/users/golovanov/gists{/gist_id}","starred_url":"https://api.github.com/users/golovanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golovanov/subscriptions","organizations_url":"https://api.github.com/users/golovanov/orgs","repos_url":"https://api.github.com/users/golovanov/repos","events_url":"https://api.github.com/users/golovanov/events{/privacy}","received_events_url":"https://api.github.com/users/golovanov/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T09:25:33Z","updated_at":"2015-03-23T09:25:33Z","body":"+1"}}