M
M
Maxim2018-12-25 11:37:10
NetBeans
Maxim, 2018-12-25 11:37:10

Why doesn't the IDE show tooltips for class methods?

Created class A, B and C in 1 folder. Class A has a variable public $b, which in __construct is equal to new B(). Class B has a public render method. Class C inherits from A and has a public method some(); In the some method, I want to call an instance method of class B, but I don't get a hint about its presence, although it works fine.

class A {
    public $b;
    public function __construct() {
        $this->b = new B();
    }
}
class B {
    public function render() {
    }
}
class C extends A {
    public function b()
    {
        $this->b()->render();
    }
}

Actually the question is why the IDE does not tell me about the methods of class B and how to implement it? All classes are in different files.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maksim, 2018-12-25
Epihin @mepihin

Replaced public $bwith protected $band everything works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question