0

I'm having a little problem with Netbeans and code completion. Here is a straightforward example :

/**
* @param SomeClass[] $param Simple array of SomeClass elements
*/
public function func(array $param) {
    $param[0]->..
}

In this sample, the code completion does not work. The problem comes from the array $param which "overwrite" the phpdoc declaration and thus i don't have code completion for my class anymore.

Is this a bug or made i a mistake ?

1 Answer 1

1

According to this question, the following should work in Netbeans:

public function func(array $param) {
    /* @var $param SomeClass[] */
    $param[0]->..
}
Sign up to request clarification or add additional context in comments.

1 Comment

Yeah i'm aware of this, but i expected a normal behaviour from netbeans. I'm wondering if i should report this to netbeans makers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.