private function setDefaultValue(
        ModelInterface $model,
        PropertyValueBagInterface $propertyValueBag,
        $propertyName,
        EnvironmentInterface $environment
    ) {
        $propertiesDefinition = $environment->getDataDefinition()->getPropertiesDefinition();

        // If in the intersect model the value available, then set it as default.
        if ($modelValue = $model->getProperty($propertyName)) {
            $propertyValueBag->setPropertyValue($propertyName, $modelValue);

            return;
        }

        if ($propertiesDefinition->hasProperty($propertyName)
            && !$environment->getInputProvider()->hasValue($propertyName)
        ) {
            $propertyValueBag->setPropertyValue(
                $propertyName,
                $propertiesDefinition->getProperty($propertyName)->getDefaultValue()
            );
        }
    }