Answer the question
In order to leave comments, you need to log in
How to get rid of duplication when describing an array structure?
Now I have to describe it like this:
/**
* @var array $items = [
* 'left' => [
* 'id' => 1,
* 'date_create' => '2019-07-23 11:47:35',
* 'date_update' => '2019-07-23 11:47:35',
* 'url' => '/sdsd/sdsdsd/',
* 'active' => 1,
* 'lang' => [
* 'id' => 1,
* 'news_id' => 1,
* 'lang_id' => 1,
* 'title' => '',
* 'preview_text' => '<html>',
* 'detail_text' => '<html>',
* ],
* ],
* 'right' => [
* 'id' => 1,
* 'date_create' => '2019-07-23 11:47:35',
* 'date_update' => '2019-07-23 11:47:35',
* 'url' => '/sdsd/sdsdsd/',
* 'active' => 1,
* 'lang' => [
* 'id' => 1,
* 'news_id' => 1,
* 'lang_id' => 1,
* 'title' => '',
* 'preview_text' => '<html>',
* 'detail_text' => '<html>',
* ],
* ],
* ];
*/
Answer the question
In order to leave comments, you need to log in
If it's just for hints in PhpStorm, then I would recommend using the deep-assoc-completion plugin and not bother with docblock.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question