WriteParameterBag
$parameters ): \Generator
{ $value =
json_decode(json_encode($data->
getValue(), \JSON_PRESERVE_ZERO_FRACTION | \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
);
if ($value !== null
) { if (!\
array_key_exists('type',
$value)) { throw new InvalidPriceFieldTypeException('none'
);
} switch ($value['type'
]) { case QuantityPriceDefinition::TYPE:
$this->
validateProperties( $value,
QuantityPriceDefinition::
getConstraints(),
$parameters->
getPath() );
if (!\
array_key_exists('taxRules',
$value)) { break;
} foreach ($value['taxRules'
] as $key =>
$taxRule) { $this->
validateProperties($taxRule, TaxRule::
getConstraints(),
$parameters->
getPath() . '/taxRules/' .
$key);
}