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

Summary: autocomplete method adding wrong type hint
Product: php Reporter: twifty
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: Dev   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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.