| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 14 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 37 | public function onPing()  | 
            ||
| 38 |     { | 
            ||
| 39 |         foreach ($this->connections as $connection) { | 
            ||
| 40 |             if (!$connection->isConnected()) { | 
            ||
| 41 | continue;  | 
            ||
| 42 | }  | 
            ||
| 43 | |||
| 44 |             try { | 
            ||
| 45 | $connection->query($connection->getDatabasePlatform()->getDummySelectSQL());  | 
            ||
| 46 |             } catch (DBALException $e) { | 
            ||
| 47 | $connection->close(); // close timed out connections so that using them connects again  | 
            ||
| 48 | }  | 
            ||
| 49 | }  | 
            ||
| 50 | }  | 
            ||
| 51 | }  | 
            ||
| 52 |