Answer the question
In order to leave comments, you need to log in
How to set the type of an array element in phpdoc?
Hello! Is it possible to specify in phpdoc that an array element has a specific type, otherwise autocomplete does not work in phpstorm? Tried like this:
$post = factory(\App\Post::class)->raw();
/** @var Carbon $post[date] */
$post['date']->setTimezone('Europe/Moscow');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question