File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,7 @@ class Record implements ActionInterface
4343 */
4444 protected $ endOnKey ;
4545
46- /**
47- * @var int
48- */
49- protected $ timeOut = 7200 ;
46+ protected ?int $ timeOut = null ;
5047
5148 /**
5249 * @var bool
@@ -126,7 +123,6 @@ public function toNCCOArray(): array
126123 $ data = [
127124 'action ' => 'record ' ,
128125 'format ' => $ this ->getFormat (),
129- 'timeOut ' => (string )$ this ->getTimeout (),
130126 'beepStart ' => $ this ->getBeepStart () ? 'true ' : 'false ' ,
131127 ];
132128
@@ -146,6 +142,10 @@ public function toNCCOArray(): array
146142 $ data ['split ' ] = $ this ->getSplit ();
147143 }
148144
145+ if ($ this ->getTimeout ()) {
146+ $ data ['timeOut ' ] = (string )$ this ->getTimeout ();
147+ }
148+
149149 if ($ this ->getEventWebhook ()) {
150150 $ data ['eventUrl ' ] = [$ this ->getEventWebhook ()->getUrl ()];
151151 $ data ['eventMethod ' ] = $ this ->getEventWebhook ()->getMethod ();
@@ -243,7 +243,7 @@ public function setEndOnSilence(int $endOnSilence): self
243243 return $ this ;
244244 }
245245
246- public function getTimeout (): int
246+ public function getTimeout (): ? int
247247 {
248248 return $ this ->timeOut ;
249249 }
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public function testJsonSerializeLooksCorrect(): void
2626 $ this ->assertSame ([
2727 'action ' => 'record ' ,
2828 'format ' => 'mp3 ' ,
29- 'timeOut ' => '7200 ' ,
3029 'beepStart ' => 'false '
3130 ], (new Record ())->jsonSerialize ());
3231 }
You can’t perform that action at this time.
0 commit comments