public function finalizeConfig(): void
    {
        if ($this->locked) {
            return;
        }

        if (null === $this->valueComparator) {
            foreach ($this->supportedValueTypes as $type => $supported) {
                if ($supported && isset(class_implements($type)[RequiresComparatorValueHolder::class])) {
                    throw new InvalidConfigurationException(
                        sprintf(
                            'Supported value-type "%s" requires a value comparator but none is set for field "%s" with type "%s".',
                            $type,
                            $this->getName(),
                            \get_class($this->getType()->getInnerType())
                        )
                    );
                }
            }
        }

        $this->locked = true;
    }
public function finalizeConfig(): void
    {
        if ($this->locked) {
            return;
        }

        if (null === $this->valueComparator) {
            foreach ($this->supportedValueTypes as $type => $supported) {
                if ($supported && isset(class_implements($type)[RequiresComparatorValueHolder::class])) {
                    throw new InvalidConfigurationException(
                        sprintf(
                            'Supported value-type "%s" requires a value comparator but none is set for field "%s" with type "%s".',
                            $type,
                            $this->getName(),
                            \get_class($this->getType()->getInnerType())
                        )
                    );
                }
            }
        }

        $this->locked = true;
    }
public function finalizeConfig ( ) : void { if ( $ this -> locked ) { return ; } if ( null === $ this -> valueComparator ) { foreach ( $ this -> supportedValueTypes as $ type => $ supported ) { if ( $ supported && isset ( class_implements ( $ type ) [ RequiresComparatorValueHolder :: class ] ) ) { throw new InvalidConfigurationException ( sprintf ( 'Supported value-type "%s" requires a value comparator but none is set for field "%s" with type "%s".' , $ type , $ this -> getName ( ) , \ get_class ( $ this -> getType ( ) -> getInnerType ( ) ) ) ) ; } } } $ this -> locked = true ; }
Finalize the configuration and mark config as locked.

After calling this method, setter methods can be no longer called.

@throws InvalidConfigurationException when a supported value-type requires
a value comparator but none is set
Finalize the configuration and mark config as locked .