Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326225 - Variable type in phpDoc comment isn't recognized correctly, when default value for variable is array
Summary: Variable type in phpDoc comment isn't recognized correctly, when default valu...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Thierry BLIND CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-25 06:38 EDT by Silver Zachara CLA
Modified: 2020-05-14 13:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silver Zachara CLA 2010-09-25 06:38:12 EDT
Hi,

when I press ctrl+shift+j and my cursor is at $_tmp variable

@class foo
{

  /**
   * Enter description here ...
   * @var unknown_type
   */
  private $_tmp = array();

  function __construct()
  {
    ;
  }
}@ 

and should be:

@class foo
{

  /**
   * Enter description here ...
   * @var array
   */
  private $_tmp = array();

  function __construct()
  {
    ;
  }
}
@
Comment 1 Eclipse Genie CLA 2015-07-28 17:37:45 EDT
New Gerrit change created: https://git.eclipse.org/r/52749
Comment 2 Thierry BLIND CLA 2015-07-29 05:15:59 EDT
Hi,
patch is available.
There's only one case that is not fully handled by this patch, it's when field declarations are grouped together:

class Foo {
   private $field1 = array(), $field2 = 5;
}

But on the other side, it also corrects function parameters handling:

function test($param = array()) {
}

I'll make a separate patch to handle the grouped field declarations, as there are non-trivial changes that I would discuss before merging ;)

Thierry.
Comment 4 Thierry BLIND CLA 2015-07-29 12:31:13 EDT
First patched was merged.
I leave this bug report open until grouped field declarations are correctly handled.

Thierry.
Comment 5 Eclipse Genie CLA 2015-07-30 18:36:00 EDT
New Gerrit change created: https://git.eclipse.org/r/52920
Comment 7 Thierry BLIND CLA 2015-08-03 04:03:11 EDT
fixed.
Comment 8 Sylvia Tancheva CLA 2015-10-22 09:43:07 EDT
Verified. Closing