This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229352

Summary: CC support for const enumeration
Product: php Reporter: maxym
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description maxym 2013-05-04 20:30:45 UTC
Is it possible to add support for class constants?

For example consider:

class SomeType
{
   const TypeA = 1;
   const TypeB = 2;
}

// $type is intended to work with constants from  SomeType class
function SomeTest($type)
{

}

$result = SomeTest(...

Then while writing argument of this function, CC should help by suggesting 2 possible values: SomeType::TypeA  and SomeType::TypeB


BTW I would like to suggest very simmilar behaviour for boolean values.
Let's consider following scenario:

class SomeClass
{
    /**
     *
     * @var boolean
     */
  var $somevar;

  function SomeMethod()
  {
    $this->somevar = ...
  } 

}


While assigning value for $this->somevar, 2 possible values (true and false) might be suggested.

with regards