private function updateDuplicateMarksForTypeName($typeName)
 {
     if (!$this->typeDescriptors->contains($typeName)) {
         return;
     }
     $typeDescriptors = $this->typeDescriptors->listByTypeName($typeName);
     $duplicate = count($typeDescriptors) > 1;
     foreach ($typeDescriptors as $typeDescriptor) {
         $typeDescriptor->markDuplicate($duplicate);
     }
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     if (!$this->snapshotTaken) {
         throw new LogicException('takeSnapshot() was not called');
     }
     // Remember for rollback()
     $this->enabledTypeAfter = null;
     if ($this->typeDescriptors->contains($this->typeName)) {
         foreach ($this->typeDescriptors->listByTypeName($this->typeName) as $typeDescriptor) {
             if ($typeDescriptor->isEnabled()) {
                 $this->enabledTypeAfter = $typeDescriptor;
             }
         }
     }
     $this->syncTypeName($this->enabledTypeBefore, $this->enabledTypeAfter);
 }