gossi\codegen\generator\builder\parts\StructBuilderPart::sortConstants PHP Method

sortConstants() private method

private sortConstants ( gossi\codegen\model\ConstantsInterface $model )
$model gossi\codegen\model\ConstantsInterface
    private function sortConstants(ConstantsInterface $model)
    {
        if ($this->config->isSortingEnabled() && ($constantSorting = $this->config->getConstantSorting()) !== false) {
            if (is_string($constantSorting)) {
                $constantSorting = ComparatorFactory::createConstantComparator($constantSorting);
            }
            $model->getConstants()->sort($constantSorting);
        }
    }