'active' => true,
'cmsPageId' =>
$context->
getFaker()->
randomElement($pageIds),
'mediaId' =>
$context->
getRandomId('media'
),
'description' =>
$context->
getFaker()->
text(),
'tags' =>
$this->
getTags($tags),
];
if ($current >=
$max) { return $cat;
} $cat['children'
] =
$this->
createCategories($context,
$pageIds,
$tags,
random_int(2, 5
),
$id,
$max,
$current);
return array_filter($cat);
} /**
* @param list<string> $tags
*
* @return array<string, mixed>
*/
private function getTags(array
$tags): array
{