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 - CC support for const enumeration
Summary: CC support for const enumeration
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-04 20:30 UTC by maxym
Modified: 2013-05-04 20:30 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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