| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class HealthzService |
||
| 22 | { |
||
| 23 | 3 | public function __construct( |
|
| 24 | private readonly HealthzRepository $repository, |
||
| 25 | ) { |
||
| 26 | 3 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Method to check that "all" is ok within our application. This will try |
||
| 30 | * to do following: |
||
| 31 | * 1) Remove data from database |
||
| 32 | * 2) Create data to database |
||
| 33 | * 3) Read data from database |
||
| 34 | * |
||
| 35 | * These steps should make sure that at least application database is |
||
| 36 | * working as expected. |
||
| 37 | * |
||
| 38 | * @throws Throwable |
||
| 39 | */ |
||
| 40 | 3 | public function check(): ?Healthz |
|
| 46 | } |
||
| 47 | } |
||
| 48 |