@@ -35,9 +35,6 @@ class DbalProducer implements Producer
35
35
*/
36
36
private $ context ;
37
37
38
- /**
39
- * @param DbalContext $context
40
- */
41
38
public function __construct (DbalContext $ context )
42
39
{
43
40
$ this ->context = $ context ;
@@ -85,10 +82,7 @@ public function send(Destination $destination, Message $message): void
85
82
$ delay = $ message ->getDeliveryDelay ();
86
83
if ($ delay ) {
87
84
if (!is_int ($ delay )) {
88
- throw new \LogicException (sprintf (
89
- 'Delay must be integer but got: "%s" ' ,
90
- is_object ($ delay ) ? get_class ($ delay ) : gettype ($ delay )
91
- ));
85
+ throw new \LogicException (sprintf ('Delay must be integer but got: "%s" ' , is_object ($ delay ) ? get_class ($ delay ) : gettype ($ delay )));
92
86
}
93
87
94
88
if ($ delay <= 0 ) {
@@ -101,17 +95,14 @@ public function send(Destination $destination, Message $message): void
101
95
$ timeToLive = $ message ->getTimeToLive ();
102
96
if ($ timeToLive ) {
103
97
if (!is_int ($ timeToLive )) {
104
- throw new \LogicException (sprintf (
105
- 'TimeToLive must be integer but got: "%s" ' ,
106
- is_object ($ timeToLive ) ? get_class ($ timeToLive ) : gettype ($ timeToLive )
107
- ));
98
+ throw new \LogicException (sprintf ('TimeToLive must be integer but got: "%s" ' , is_object ($ timeToLive ) ? get_class ($ timeToLive ) : gettype ($ timeToLive )));
108
99
}
109
100
110
101
if ($ timeToLive <= 0 ) {
111
102
throw new \LogicException (sprintf ('TimeToLive must be positive integer but got: "%s" ' , $ timeToLive ));
112
103
}
113
104
114
- $ dbalMessage ['time_to_live ' ] = time () + (int ) $ timeToLive / 1000 ;
105
+ $ dbalMessage ['time_to_live ' ] = time () + (int ) ( $ timeToLive / 1000 ) ;
115
106
}
116
107
117
108
try {
0 commit comments