File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace OldSound \RabbitMqBundle \DependencyInjection ;
44
5+ use OldSound \RabbitMqBundle \RabbitMq \Producer ;
56use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
67use Symfony \Component \Config \Definition \ConfigurationInterface ;
78use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
@@ -125,7 +126,7 @@ protected function addProducers(ArrayNodeDefinition $node)
125126 ->scalarNode ('enable_logger ' )->defaultFalse ()->end ()
126127 ->scalarNode ('service_alias ' )->defaultValue (null )->end ()
127128 ->scalarNode ('default_routing_key ' )->defaultValue ('' )->end ()
128- ->scalarNode ('default_content_type ' )->defaultValue (' text/plain ' )->end ()
129+ ->scalarNode ('default_content_type ' )->defaultValue (Producer:: DEFAULT_CONTENT_TYPE )->end ()
129130 ->integerNode ('default_delivery_mode ' )->min (1 )->max (2 )->defaultValue (2 )->end ()
130131 ->end ()
131132 ->end ()
Original file line number Diff line number Diff line change 1010 */
1111class Producer extends BaseAmqp implements ProducerInterface
1212{
13- protected $ contentType = 'text/plain ' ;
13+ const DEFAULT_CONTENT_TYPE = 'text/plain ' ;
14+ protected $ contentType = Producer::DEFAULT_CONTENT_TYPE ;
1415 protected $ deliveryMode = 2 ;
1516 protected $ defaultRoutingKey = '' ;
1617
You can’t perform that action at this time.
0 commit comments