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 269144 - autocomplete method adding wrong type hint
Summary: autocomplete method adding wrong type hint
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 08:35 UTC by twifty
Modified: 2016-11-28 08:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description twifty 2016-11-28 08:35:41 UTC
Take the interface:

interface IBase {
    /**
     * @param \stdClass[] $values
     */
    public function doSth(array $values);
}

When extending the method in an implementing class, the wrong type hint is added:

class B implements IBase {
    public function doSth(\stdClass $values)
    {
        //...
    }
}

The added type hint is taken from the method docBlock and not the method signature.