Answer the question
In order to leave comments, you need to log in
How to make docblock for someone else's library?
We use someone else's library (via composer). For its objects, all access to the fields goes through __get, while the classes do not have any doc blocks, respectively, code hints do not work, code inspections scream that such fields do not exist (we use PhpStorm).
I want to add @property myself, but I can't change their code. I tried to make the same classes with the same namespace and register them there - but then the inspectors complain that there are 2 identical classes.
Is there any way out of this?
Answer the question
In order to leave comments, you need to log in
I tried to make the same classes with the same namespace and write there
create your own class that will be inherited from that library, write in it:
/**
* Base class that represents a query for the 'tasks' table.
*
* @method ChildTaskQuery groupById() Group by the id column
* @method ChildTaskQuery groupByCreatedAt() Group by the created_at column
* @method ChildTaskQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ChildTaskQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildTaskQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildTaskQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
*/
class MyClass extends \Core\Class
{
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question