{"action":"opened","issue":{"url":"https://api.github.com/repos/aik099/CodingStandard/issues/77","labels_url":"https://api.github.com/repos/aik099/CodingStandard/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/aik099/CodingStandard/issues/77/comments","events_url":"https://api.github.com/repos/aik099/CodingStandard/issues/77/events","html_url":"https://github.com/aik099/CodingStandard/issues/77","id":68362694,"number":77,"title":"Validate \"@var\" comment","user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aik099/CodingStandard/labels/priority-normal","name":"priority-normal","color":"009800"},{"url":"https://api.github.com/repos/aik099/CodingStandard/labels/type-enhancement","name":"type-enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-14T12:50:43Z","updated_at":"2015-04-14T12:50:43Z","closed_at":null,"body":"The correct `@var` comment looks like this:\r\n```php\r\n/** @var ClassName $variable_name */\r\n$variable_name = new ClassName();\r\n```\r\nSeveral things can be wrong here:\r\n* comment placed under variable assignment:\r\n```php\r\n$variable_name = new ClassName();\r\n/** @var ClassName $variable_name */\r\n```\r\n* class name & variable name swapped:\r\n```php\r\n/** @var $variable_name ClassName */\r\n$variable_name = new ClassName();\r\n```\r\n* missing 2nd asterisk (turns T_DOC_BLOCK into regular T_COMMENT)\r\n```php\r\n/* @var $variable_name ClassName */\r\n$variable_name = new ClassName();\r\n```\r\n* variable name in comment doesn't match variable name in assignment on next line (if any found):\r\n```php\r\n/** @var $another_variable_name ClassName */\r\n$variable_name = new ClassName();\r\n```\r\nAll of above can be combined."}}