code: private function addMixin(Mixin $mixin)
      {
          $id = $mixin->getId();
          $curieStr = $id->getCurie()->toString();
  
          if (isset($this->mixinsByCurie[$curieStr])) {
              throw new MixinAlreadyAdded($this, $this->mixinsByCurie[$curieStr], $mixin);
          }
  
          $this->mixins[$id->getCurieMajor()] = $mixin;
          $this->mixinsByCurie[$curieStr] = $mixin;
  
          foreach ($mixin->getFields() as $field) {
              $this->addField($field);
          }
      }
docs: @param Mixin $mixin
  
  @throws MixinAlreadyAdded