| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class CompositeQueryVariableValueCondition extends AbstractQueryVariableValueCondition |
||
| 9 | { |
||
| 10 | protected $aggregatedValues = []; |
||
| 11 | |||
| 12 | public function __construct(QueryVariableValue $variableValue) |
||
| 15 | } |
||
| 16 | |||
| 17 | public function initializeValue(VariableSerializersInterface $serializers, string $dbType): void |
||
| 18 | { |
||
| 19 | $typedValue = $this->wrappedQueryValue->getTypedValue(); |
||
| 20 | |||
| 21 | $resolver = Context::getProcessEngineConfiguration()->getValueTypeResolver(); |
||
| 22 | $concreteTypes = $resolver->getSubTypes($typedValue->getType()); |
||
|
|
|||
| 23 | |||
| 24 | foreach ($concreteTypes as $type) { |
||
| 25 | if ($type->canConvertFromTypedValue($typedValue)) { |
||
| 26 | $convertedValue = $type->convertFromTypedValue($typedValue); |
||
| 27 | $aggregatedValue = new SingleQueryVariableValueCondition($this->wrappedQueryValue); |
||
| 28 | $aggregatedValue->initializeValue($serializers, $convertedValue, $dbType); |
||
| 29 | $this->aggregatedValues[] = $aggregatedValue; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getDisjunctiveConditions(): array |
||
| 37 | } |
||
| 38 | } |
||
| 39 |