protected function addConstants(array $constants, ClassDescriptor $classDescriptor): void
    {
        foreach ($constants as $constant) {
            $constantDescriptor = $this->getBuilder()->buildDescriptor($constant);
            if ($constantDescriptor instanceof ConstantDescriptor) {
                $constantDescriptor->setParent($classDescriptor);
                $classDescriptor->getConstants()->set($constantDescriptor->getName(), $constantDescriptor);
            }
        }
    }
protected function addConstants(array $constants, ClassDescriptor $classDescriptor): void
    {
        foreach ($constants as $constant) {
            $constantDescriptor = $this->getBuilder()->buildDescriptor($constant);
            if ($constantDescriptor instanceof ConstantDescriptor) {
                $constantDescriptor->setParent($classDescriptor);
                $classDescriptor->getConstants()->set($constantDescriptor->getName(), $constantDescriptor);
            }
        }
    }
protected function addConstants ( array $ constants , ClassDescriptor $ classDescriptor ) : void { foreach ( $ constants as $ constant ) { $ constantDescriptor = $ this -> getBuilder ( ) -> buildDescriptor ( $ constant ) ; if ( $ constantDescriptor instanceof ConstantDescriptor ) { $ constantDescriptor -> setParent ( $ classDescriptor ) ; $ classDescriptor -> getConstants ( ) -> set ( $ constantDescriptor -> getName ( ) , $ constantDescriptor ) ; } } }
Registers the child constants with the generated Class Descriptor.

@param Constant[] $constants
Registers the child constants with the generated Class Descriptor .