private function addTrait($trait, $typesReference)
{
$traitFull = $trait;
if (array_key_exists($trait, $typesReference)) {
$traitNamespace = $typesReference[$trait];
$traitFull = $traitNamespace . '\\' . $trait;
}
$this->currentClass->getNamespace()->addUse($traitFull);
$this->currentClass->addTrait($traitFull);
$this->info('Add trait', ['class' => $this->currentClass->getName(), 'trait' => $traitFull]);
}