1 | <?php |
||
23 | class PingKeepAlive extends ClientModule |
||
24 | { |
||
25 | private $_interval = 15; |
||
26 | private $_timer; |
||
27 | |||
28 | /** |
||
29 | * PingKeepAlive constructor. |
||
30 | * |
||
31 | * @param float $interval Keep alive interval in seconds |
||
32 | */ |
||
33 | public function __construct($interval = 15.) |
||
37 | |||
38 | public function setClient(XmppClient $client) |
||
44 | |||
45 | /** |
||
46 | * Starts keep alive timer |
||
47 | */ |
||
48 | public function enable() |
||
54 | |||
55 | /** |
||
56 | * Stops keep alive timer |
||
57 | */ |
||
58 | public function disable() |
||
62 | |||
63 | private function keepAlive() |
||
71 | } |
||
72 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.