Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | final class PingConnectionMiddleware implements Middleware |
||
15 | { |
||
16 | private Connection $connection; |
||
17 | |||
18 | public function __construct(Connection $connection) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Reconnects to the database if the connection is expired. |
||
25 | * |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public function execute(object $command, callable $next) |
||
36 | } |
||
37 | |||
38 | private function ping(Connection $connection): bool |
||
51 |