public function takeSnapshot()
    {
        $this->enabledTypeBefore = null;

        if ($this->typeDescriptors->contains($this->typeName)) {
            foreach ($this->typeDescriptors->listByTypeName($this->typeName) as $typeDescriptor) {
                if ($typeDescriptor->isEnabled()) {
                    $this->enabledTypeBefore = $typeDescriptor;
                }
            }
        }

        $this->snapshotTaken = true;
    }