File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ composer.lock
4
4
.php_cs.cache
5
5
/vendor /
6
6
update.bat
7
+ test.bat
7
8
.phpunit.result.cache
8
9
todo.txt
Original file line number Diff line number Diff line change @@ -618,7 +618,14 @@ public function types()
618
618
*/
619
619
public function typesAndWaits (float $ seconds )
620
620
{
621
- $ this ->getDriver ()->typesAndWaits ($ this ->message , $ seconds );
621
+ $ driver = $ this ->getDriver ();
622
+
623
+ if (method_exists ($ driver , 'typesAndWaits ' )) {
624
+ $ this ->getDriver ()->typesAndWaits ($ this ->message , $ seconds );
625
+ } else {
626
+ $ this ->types ();
627
+ usleep ($ seconds * 1000000 );
628
+ }
622
629
623
630
return $ this ;
624
631
}
Original file line number Diff line number Diff line change @@ -74,15 +74,6 @@ public function hasMatchingEvent();
74
74
*/
75
75
public function types (IncomingMessage $ matchingMessage );
76
76
77
- /**
78
- * Send a typing indicator and wait for the given amount of seconds.
79
- * @param IncomingMessage $matchingMessage
80
- * @param int $seconds
81
- * @param float $seconds
82
- * @return mixed
83
- */
84
- public function typesAndWaits (IncomingMessage $ matchingMessage , float $ seconds );
85
-
86
77
/**
87
78
* Tells if the stored conversation callbacks are serialized.
88
79
*
You can’t perform that action at this time.
0 commit comments