| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Code Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | private function messagesNode(string $type): ArrayNodeDefinition |
||
| 32 | { |
||
| 33 | return (new ArrayNodeDefinition($type)) |
||
| 34 | ->beforeNormalization() |
||
| 35 | ->ifString() |
||
| 36 | ->then(function (string $config): array { |
||
| 37 | return ['default_queue' => $config, 'enabled' => true]; |
||
| 38 | }) |
||
| 39 | ->end() |
||
| 40 | ->canBeEnabled() |
||
|
|
|||
| 41 | ->children() |
||
| 42 | ->scalarNode('transport_name') |
||
| 43 | ->cannotBeEmpty() |
||
| 44 | ->defaultValue('default') |
||
| 45 | ->end() |
||
| 46 | ->scalarNode('default_queue') |
||
| 47 | ->cannotBeEmpty() |
||
| 48 | ->defaultValue(sprintf('asynchronous_%s', $type)) |
||
| 49 | ->end() |
||
| 50 | ->scalarNode('processor_service_id') |
||
| 51 | ->cannotBeEmpty() |
||
| 52 | ->defaultValue(sprintf('enqueue.simple_bus.%s_processor', $type)) |
||
| 53 | ->end() |
||
| 54 | ->arrayNode('queue_map') |
||
| 55 | ->requiresAtLeastOneElement() |
||
| 56 | ->useAttributeAsKey(true) |
||
| 57 | ->scalarPrototype() |
||
| 58 | ->isRequired() |
||
| 59 | ->end() |
||
| 60 | ->end() |
||
| 61 | ->end() |
||
| 62 | ; |
||
| 65 |