| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | final class PingConnectionMiddleware implements Middleware |
||
| 19 | { |
||
| 20 | private Connection $connection; |
||
| 21 | |||
| 22 | public function __construct(Connection $connection) |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Reconnects to the database if the connection is expired. |
||
| 29 | * |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | public function execute(object $command, callable $next) |
||
| 40 | } |
||
| 41 | |||
| 42 | private function ping(Connection $connection): bool |
||
| 61 |