original_string: public function setMasterVariant(VariantInterface $masterVariant)
      {
          $masterVariant->setMaster(true);
  
          /** @var VariantInterface $variant */
          foreach ($this->variants as $variant) {
              if ($variant->isMaster() && $variant !== $masterVariant) {
                  $variant->setMaster(false);
              }
          }
  
          if (!$this->variants->contains($masterVariant)) {
              $masterVariant->setObject($this);
              $this->variants->add($masterVariant);
          }
  
          return $this;
      }
code: public function setMasterVariant(VariantInterface $masterVariant)
      {
          $masterVariant->setMaster(true);
  
          /** @var VariantInterface $variant */
          foreach ($this->variants as $variant) {
              if ($variant->isMaster() && $variant !== $masterVariant) {
                  $variant->setMaster(false);
              }
          }
  
          if (!$this->variants->contains($masterVariant)) {
              $masterVariant->setObject($this);
              $this->variants->add($masterVariant);
          }
  
          return $this;
      }
code_tokens: public function setMasterVariant ( VariantInterface $ masterVariant ) { $ masterVariant -> setMaster ( true ) ; /** @var VariantInterface $variant */ foreach ( $ this -> variants as $ variant ) { if ( $ variant -> isMaster ( ) && $ variant !== $ masterVariant ) { $ variant -> setMaster ( false ) ; } } if ( ! $ this -> variants -> contains ( $ masterVariant ) ) { $ masterVariant -> setObject ( $ this ) ; $ this -> variants -> add ( $ masterVariant ) ; } return $ this ; }
docstring: Set the master variant
  
  @param VariantInterface $masterVariant
  
  @return $this
docstring_tokens: Set the master variant