{"action":"created","issue":{"url":"https://api.github.com/repos/robertop/pelet/issues/11","labels_url":"https://api.github.com/repos/robertop/pelet/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/robertop/pelet/issues/11/comments","events_url":"https://api.github.com/repos/robertop/pelet/issues/11/events","html_url":"https://github.com/robertop/pelet/issues/11","id":117535153,"number":11,"title":"Cannot Get Variable Type from PHPDoc Comment","user":{"login":"mtangoo","id":1502872,"avatar_url":"https://avatars.githubusercontent.com/u/1502872?v=3","gravatar_id":"","url":"https://api.github.com/users/mtangoo","html_url":"https://github.com/mtangoo","followers_url":"https://api.github.com/users/mtangoo/followers","following_url":"https://api.github.com/users/mtangoo/following{/other_user}","gists_url":"https://api.github.com/users/mtangoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mtangoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtangoo/subscriptions","organizations_url":"https://api.github.com/users/mtangoo/orgs","repos_url":"https://api.github.com/users/mtangoo/repos","events_url":"https://api.github.com/users/mtangoo/events{/privacy}","received_events_url":"https://api.github.com/users/mtangoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-18T08:03:54Z","updated_at":"2015-11-19T04:19:13Z","closed_at":null,"body":"I'm catching Variable found with code below. Everytime PHPDoc type (p1 and p2)  is empty wile I can happily see p3 comment just fine. I tried to trace myself but I get no where as I'm still learning how the library does things.\r\nThe code I use is this:\r\n```php\r\n<?php\r\n\r\nnamespace app\\controllers;\r\n\r\nuse yii\\web\\Controller; \r\n/**@var $this yii\\db\\ActiveQuery */ \r\n \r\nclass MeController extends Controller\r\n{ \r\n    /**\r\n     * @link http://www.yiiframework.com/\r\n     * @copyright Copyright (c) 2008 Yii Software LLC\r\n     * @license http://www.yiiframework.com/license/\r\n     */\r\n     private static $itsme = \"My Full Name\";\r\n     \r\n     public function test1()\r\n     { \r\n         $me = $db->getQuery();\r\n         $me-> //WANT TO GET $me as type of yii\\db\\ActiveQuery\r\n         \r\n     }\r\n     \r\n     public function test2()\r\n     {\r\n           \r\n     }\r\n}\r\n```\r\nI have tried to move PHPDoc to variable like\r\n```php\r\n/**@var $me yii\\db\\ActiveQuery */ \r\n         $me = $db->getQuery();\r\n         $me->\r\n```\r\nit does not work. I have tried variances like `/*@var $me yii\\db\\ActiveQuery */ ` and every combination I can think of but with no avail. Comments on the method on sources says:\r\n>The name of the \"type\" of this variable that was parsed out of the PHPDoc. For example  when a variable is decorated with \" \\@var $var TypeClass\" comments\r\n\r\nBut that format ie : \r\n\r\n```php \r\n/**\\@var $this yii\\db\\ActiveQuery */ \r\n         $me = $db->getQuery();\r\n         $me->\r\n```\r\ndoes not work also!\r\n\r\nAm I missing something? Also is it possible to add method that will receive only PHPDoc comments just like we do with variables? and then it will be easier to deal with them.\r\nThanks for great library.\r\n\r\n```cpp\r\nVariableFound(const UnicodeString& namespaceName,\r\n              const UnicodeString& className,\r\n              const UnicodeString& methodName,\r\n              const pelet::VariableClass& variable,\r\n              pelet::ExpressionClass* expression,\r\n              const UnicodeString& comment)\r\n{\r\n    wxString name = ConvertTowx(variable.ChainList[0].Name);\r\n\r\n    if(name!=m_variable)\r\n        return;\r\n\r\n    if(pelet::ExpressionClass::NEW_CALL == expression->ExpressionType)\r\n    {\r\n        pelet::NewInstanceExpressionClass* srcVariable = (pelet::NewInstanceExpressionClass*)expression;\r\n        m_expressions.Add(ConvertTowx(srcVariable->ClassName));\r\n    }\r\n    else if(pelet::ExpressionClass::ARRAY == expression->ExpressionType)\r\n    {\r\n\r\n    }\r\n    else if(pelet::ExpressionClass::SCALAR == expression->ExpressionType)\r\n    {\r\n\r\n    }\r\n    else if(pelet::ExpressionClass::VARIABLE == expression->ExpressionType)\r\n    {\r\n        pelet::VariableClass* srcVariable = (pelet::VariableClass*)expression;\r\n\r\n        wxString p1 = ConvertTowx(srcVariable->PhpDocType);\r\n        wxString p2 = ConvertTowx(variable.PhpDocType);\r\n        wxString p3 = ConvertTowx(comment);\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/robertop/pelet/issues/comments/157946595","html_url":"https://github.com/robertop/pelet/issues/11#issuecomment-157946595","issue_url":"https://api.github.com/repos/robertop/pelet/issues/11","id":157946595,"user":{"login":"robertop","id":1117179,"avatar_url":"https://avatars.githubusercontent.com/u/1117179?v=3","gravatar_id":"","url":"https://api.github.com/users/robertop","html_url":"https://github.com/robertop","followers_url":"https://api.github.com/users/robertop/followers","following_url":"https://api.github.com/users/robertop/following{/other_user}","gists_url":"https://api.github.com/users/robertop/gists{/gist_id}","starred_url":"https://api.github.com/users/robertop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertop/subscriptions","organizations_url":"https://api.github.com/users/robertop/orgs","repos_url":"https://api.github.com/users/robertop/repos","events_url":"https://api.github.com/users/robertop/events{/privacy}","received_events_url":"https://api.github.com/users/robertop/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T04:19:13Z","updated_at":"2015-11-19T04:19:13Z","body":"when pelet sees code like this:\r\n\r\n```php\r\n    /* @var $me yii\\db\\ActiveQuery */ \r\n    $me = $db->getQuery();\r\n```\r\n\r\nThere will be 2 calls to the `VariableFound` callback; once for the doc comment and once for the assignment. I see that the variable it is being reported as a scalar (since there is no assignment). But looking at it now, this behavior is probably wrong.\r\n\r\nI also see another error, PHP doc comments in the form `/**  */` are not being parsed for vars.\r\n\r\nI'll try to fix in a bit."}}